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 (de)serialization of new types where the internal type is skipped #1622

Merged
merged 2 commits into from Sep 8, 2019
Merged

Fix (de)serialization of new types where the internal type is skipped #1622

merged 2 commits into from Sep 8, 2019

Conversation

Xaeroxe
Copy link
Contributor

@Xaeroxe Xaeroxe commented Sep 7, 2019

Fixes #1396

The derive logic for newtype variants was not considering the possibility that the one value in the newtype might be skipped. This pull request fixes that. Additionally it adds some test cases that failed before, and now succeed.

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Sep 7, 2019

This isn't quite ready for merge yet. The bug fix still needs to be applied to the functions for other forms of tagging in enums. I'll work on that in the morning.

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Sep 7, 2019

Ok, this has been applied to other enum representations and is ready for review.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit 111c18d into serde-rs:master Sep 8, 2019
@Xaeroxe Xaeroxe deleted the fix-new-types branch September 8, 2019 05:59
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.

#[serde(skip)] in tuple enum variants silently ignored
2 participants