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

Fix soundness hole in the public API #25

Closed
wants to merge 1 commit into from

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Mar 19, 2021

Closes #24

@matklad
Copy link
Contributor Author

matklad commented Mar 19, 2021

Note that this assumes that nobody outside this crate actually needs to call or override is_u8. With some more work, we can make this method safe to call from outside of the crate.

Copy link
Contributor

@evgenykuzyakov evgenykuzyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dtolnay what do you think?

Copy link
Contributor

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the approach in #26 would be better. There should be no need to use any unsafe code in any of this.

@frol frol closed this Mar 20, 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.

Confusing safety contract of is_u8
5 participants