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

Refactor code that generates __Field enums #2555

Merged
merged 5 commits into from Aug 7, 2023
Merged

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Aug 6, 2023

This PR makes a small refactoring in order to remove complexity in deserialize_generated_identifier about determining ignore_variant and fallthrough values. Because both values depends only on input parameters, I moved they determination from deserialize_generated_identifier to the calling functions. Thus, it is easier to understand which pairs of parameters are possible

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.

Nice!

@dtolnay dtolnay merged commit 3bff326 into serde-rs:master Aug 7, 2023
16 checks passed
@Mingun Mingun deleted the field branch August 7, 2023 06:04
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

2 participants