-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Add Copy to the derived traits for active enums #634
Conversation
Although as for now there is no reason those enums can't be |
I think the behaviour of adding |
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.
Hey @e-rhodes, sorry for the delay! Thanks for contributions!!
The opt-in --with-copy-enums
flag look great!
@tyt2y3 has any comments on the naming?
Thank you. We may turn that on as default in the future! |
PR Info
Adds
Added command line flag
--with-copy-enums
tosea-orm-cli
. If provided, the automatically generated enums will derive theCopy
trait. Otherwise, the behavior is unchanged.Breaking Changes
No changes to public API methods, CLI behavior is backwards compatible.
Changes
Added
with_copy_enums
parameter in several places to get the behavior from the CLI tosea_orm_codegen
(basically added the new flag anywhere thewith-serde
flag got passed).