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

Remove unnecessary unsafe blocks from FromPrimitive example #42

Conversation

jonasmalacofilho
Copy link
Contributor

Both std::convert::From::from and num_enum::FromPrimitive::from_primitive are safe to call.

@illicitonion
Copy link
Owner

Well spotted - I'm not sure how those unsafes slipped in! Thanks for the contribution!

@illicitonion illicitonion merged commit 380e108 into illicitonion:main May 7, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants