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

Bugfix/73/whitelist variant attributes to copy #82

Conversation

azriel91
Copy link
Contributor

Whitelist attributes to copy across from main enum variants to discriminant enum variants.
Currently the whitelist is: "doc", "cfg", "allow", "deny".

Fixes #73

A potential extension (not implemented, but would fix #41) is to allow a #[strum_discriminant(..) attribute on each variant, and pass through everything within the .., flattening away the strum_discriminant layer, and making sure to override any of the whitelisted attributes if present.

@Peternator7
Copy link
Owner

Feels super reasonable! Thanks for the PR!

@sunshowers
Copy link

@Peternator7 Any chance you could do a release with this fix? I happen to need it :) thank you!

@Peternator7
Copy link
Owner

Released as part of 0.18.0 https://crates.io/crates/strum

@azriel91 azriel91 deleted the bugfix/73/whitelist-variant-attributes-to-copy branch April 2, 2020 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants