Implement TryFrom<String> in EnumString - #302
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
FromStrother wise it will generate something similar to thisCould you please add the "hacktoberfest-accepted" label to the PR.