-
Notifications
You must be signed in to change notification settings - Fork 154
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
Implement TryFrom<String> in EnumString #302
base: master
Are you sure you want to change the base?
Conversation
Hi @wyatt-herkamp, I like the idea of this PR, but I think it'll be a lot clearer if there's some additional refactoring done. Mostly, the MSRV for strum has been increased to 1.60 b/c of syn + quote so we don't need the conditional compilation anymore, and it's probably cleaner to define FromStr in terms of TryFrom rather than the other way around. If we do that, the bodies of TryFrom for I see this is a hackathon PR; since it's near the end of Oct, I just wanted to see if it's the type of work you still have time for? |
I already got the completion I will working on the refactoring next week. |
Removed RustVersion from Macro Ran `cargo fmt`
For some reason having the nostd tests in the same workspace as the regular tests was causing nostd to use the same macro. So it would add std code. I think this should fix it |
@Peternator7 so I did not realize cargo weak features were not stabilized until Rust 1.61. So the options are either. |
Implement
TryFrom<String>
during EnumStringIf no default variant is provided it will just call
FromStr
other wise it will generate something similar to thisCould you please add the "hacktoberfest-accepted" label to the PR.