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 22, 2024
1 parent 72a7401 commit 9702ce1
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 @@ -1910,7 +1910,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 9702ce1

Please sign in to comment.