Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Oct 21, 2024
1 parent 03307b2 commit 89e2b36
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions serde_derive/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,22 +1439,21 @@ fn deserialize_internally_tagged_enum(
_ => None,
}
});
let variant_arms = variants
.map(|(i, variant)| {
let variant_name = field_i(i);
let variant_arms = variants.map(|(i, variant)| {
let variant_name = field_i(i);

let block = Match(deserialize_internally_tagged_variant(
&format!("Variant{}", i),
params,
variant,
cattrs,
quote!(__deserializer),
));
let block = Match(deserialize_internally_tagged_variant(
&format!("Variant{}", i),
params,
variant,
cattrs,
quote!(__deserializer),
));

quote! {
#field_struct_name::#variant_name => #block
}
});
quote! {
#field_struct_name::#variant_name => #block
}
});

let expecting = format!("internally tagged enum {}", params.type_name());
let expecting = cattrs.expecting().unwrap_or(&expecting);
Expand Down

0 comments on commit 89e2b36

Please sign in to comment.