-
Notifications
You must be signed in to change notification settings - Fork 736
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 enum generation #3112
Refactor enum generation #3112
Conversation
f175581
to
7d9b3e9
Compare
Could you squash the commits as well? Thanks. |
0fc80e8
to
e911598
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, thanks!
Gather all the enum variants. This allows us to simplify some logic, make the code more readable, by putting the actual code generation close together in the build method. For users, the main benefit is that Newtype enums now only have a single impl block, instead of one impl block per enum variant.
e911598
to
4ad0d95
Compare
@emilio Is there anything that still needs to be done to get this merged? |
@emilio Friendly ping |
No, sorry, I just apparently forgot to put it in the merge queue. |
Gather all the enum variants and let the builder generate everything at once.
This allows us to simplify some logic and makes the code more readable, by putting the actual code generation close together in the build method.
For users, the main benefit is that Newtype enums now only have a single impl block, instead of one impl block per enum variant.