Skip to content

Commit

Permalink
Use deserialize_unit instead of deserialize_any for unit variants of …
Browse files Browse the repository at this point in the history
…untagged and adjacently tagged enums
  • Loading branch information
Mingun committed Oct 21, 2024
1 parent f70b26e commit 8fe93e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde_derive/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ fn deserialize_untagged_variant(
quote!((#default))
});
quote_expr! {
match _serde::Deserializer::deserialize_any(
match _serde::Deserializer::deserialize_unit(
#deserializer,
_serde::__private::de::UntaggedUnitVisitor::new(#type_name, #variant_name)
) {
Expand Down

0 comments on commit 8fe93e5

Please sign in to comment.