Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
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
@@ -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)
) {

0 comments on commit 9702ce1

Please sign in to comment.