-
Notifications
You must be signed in to change notification settings - Fork 28
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 custom attributes for States and Events enum #88
Add custom attributes for States and Events enum #88
Conversation
Use `states_attr` and `events_attr` to add custom attributes (eg. #[allow(...)])
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.
I would prefer if we just completely replaced the derive_*
fields and replaced them with these *_attributes
fields instead. Having them spread across different implementations seems messy.
Alternatively, are there some common-sense attributes that you think should be applied to states/events?
I agree this is better, I'll remove the
My motivation was to customize the structs when serializing using serde. Since this is also targeted towards |
Breaking changes are fine. We've done lots of them recently, and I try to release as often as required :) The migration tends to be quite easy. |
…vents_attr` instead
@ryan-summers Made the changes including tests, and docs, please feel free to review/edit |
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.
Mind just updating the changelog and addressing CI (clippy)? Looks like a nice clean change set - nice work :)
Use
states_attr
andevents_attr
to add custom attributes (eg. #[allow(...)])Example: