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: don't check skipped variant with internal tag #2266

Merged
merged 1 commit into from Jul 26, 2023

Conversation

flisky
Copy link
Contributor

@flisky flisky commented Aug 23, 2022

No description provided.

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 b789286 into serde-rs:master Jul 26, 2023
Comment on lines +2274 to +2277
#[serde(skip)]
B {
t: String
},
Copy link
Contributor

Choose a reason for hiding this comment

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

What mean that variant is skipped? How it behaves when you try to serialize that variant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variant cannot be serialized & deserialized. Serializing it will throw a runtime error Err(Error("the enum variant Data::B cannot be serialized", line: 0, column: 0)).

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

3 participants