Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deserializing enum out of MapAccessDeserializer #1522

Merged
merged 1 commit into from May 6, 2019
Merged

Support deserializing enum out of MapAccessDeserializer #1522

merged 1 commit into from May 6, 2019

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented May 6, 2019

StringDeserializer implements deserialize_enum for deserializing unit variants out of a string, so it seems reasonable for MapAccessDeserializer to implement deserialize_enum for deserializing the other kinds of variants out of a map.

https://users.rust-lang.org/t/serde-custom-deserialize-untagged-enum-with-tagged-variant/28003

@dtolnay dtolnay merged commit c8e09e2 into serde-rs:master May 6, 2019
@dtolnay dtolnay deleted the enum branch May 6, 2019 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant