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

Fix enum serialization #26

Closed
wants to merge 2 commits into from
Closed

Fix enum serialization #26

wants to merge 2 commits into from

Conversation

natsuki-i
Copy link
Contributor

Fix #18

This PR will allow the following tests to pass.

#[derive(serde::Serialize)]
enum Foo {
    Bar,
}

let foo = Foo::Bar;
assert_eq!(
    serde_json::to_string(&foo).unwrap(),
    serde_json::to_string(&serde_value::to_value(&foo).unwrap()).unwrap()
);

This PR has breaking changes.

arcnmx pushed a commit that referenced this pull request Jul 16, 2020
@arcnmx
Copy link
Owner

arcnmx commented Jul 17, 2020

Sorry this took me so long to get to. This was cherry-picked as 9715c3d, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enum variants are not distinguishable
2 participants