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 12, 2023
1 parent dafede9 commit a08c600
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 @@ -1051,7 +1051,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 a08c600

Please sign in to comment.