Skip to content

Commit

Permalink
Add support for struct variants in untagged and adjacently tagged enu…
Browse files Browse the repository at this point in the history
…ms in non self-describing formats

Visitor that passed th the deserialize_any supports only visit_map method,
so we can always requests deserialize_map
  • Loading branch information
Mingun committed Aug 5, 2024
1 parent 70f8cd7 commit a20d574
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 @@ -1044,7 +1044,7 @@ fn deserialize_struct(
_serde::Deserializer::deserialize_map(#deserializer, #visitor_expr)
},
StructForm::Untagged(_, deserializer) => quote! {
_serde::Deserializer::deserialize_any(#deserializer, #visitor_expr)
_serde::Deserializer::deserialize_map(#deserializer, #visitor_expr)
},
};

Expand Down

0 comments on commit a20d574

Please sign in to comment.