Skip to content

Commit

Permalink
do not cause warnings when all fields in struct are flattened
Browse files Browse the repository at this point in the history
  • Loading branch information
nrxus committed Dec 24, 2024
1 parent 20f91e5 commit 5a15a54
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions scylla-macros/src/serialize/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,15 @@ impl Generator for ColumnSortingGenerator<'_> {
)?;
self.missing.remove(#unflattened_columns);
})*
_ => {
_ => 'flatten_try: {
#({
match self.#flattened_fields.serialize_field(spec, writer)? {
#crate_path::ser::row::FieldStatus::Done => {
self.missing.remove(stringify!(#flattened_fields));
return ::std::result::Result::Ok(if self.missing.is_empty() {
#crate_path::ser::row::FieldStatus::Done
} else {
#crate_path::ser::row::FieldStatus::NotDone
});
break 'flatten_try;
}
#crate_path::ser::row::FieldStatus::NotDone => {
return ::std::result::Result::Ok(#crate_path::ser::row::FieldStatus::NotDone)
break 'flatten_try;
}
#crate_path::ser::row::FieldStatus::NotUsed => {}
};
Expand Down

0 comments on commit 5a15a54

Please sign in to comment.