You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you derive EnumString on a enum with a #[strum(default)] it generates a TryFrom<&str> implementation which can never return an error. It would make sense to generate From<&str> instead
This would be a breaking change
The text was updated successfully, but these errors were encountered:
I think strum should still generate a FromStr and TryFrom<&str> implementation, but with the error type as Infallible, in addition to generating a From<&str> (and maybe From<String>).
This would allow me to use strum in a library I'm writing without having strum types as part of the API.
If you derive
EnumString
on a enum with a#[strum(default)]
it generates aTryFrom<&str>
implementation which can never return an error. It would make sense to generateFrom<&str>
insteadThis would be a breaking change
The text was updated successfully, but these errors were encountered: