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

Allow implementing From and TryInto #1

Open
charles-r-earp opened this issue Nov 24, 2020 · 1 comment
Open

Allow implementing From and TryInto #1

charles-r-earp opened this issue Nov 24, 2020 · 1 comment

Comments

@charles-r-earp
Copy link
Contributor

I might even submit a PR for this. It's a common pattern when using enums to implement MyEnum From<Variant> for each variant, and likewise it would even be nice to have the reverse, TryInto<Variant> for MyEnum.
Notably the enumerate crate does implement From, but it isn't as flexible, it can't be combined with attributes like derive.

@NyxCode
Copy link
Owner

NyxCode commented Nov 24, 2020

Totally agree, From & TryInto implementations would be awesome. I'd appreciate a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants