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

Audit use of unsafe in uri/scheme.rs #416

Merged
merged 2 commits into from
May 7, 2020

Conversation

sbosnick
Copy link
Contributor

Added simple test for creating a Scheme directly (with both valid and invalid input) then added comments explaining the postcondition that ensures the one use of "unsafe" is sound.

This is part of #412.

The tests include an [u8] that is invalid UTF-8.
The comments describe the postcondition on parse_exact() that makes the
one use of "unsafe" in Scheme::try_from(&'a [u8]) sound.
@seanmonstar seanmonstar merged commit 3ef1133 into hyperium:master May 7, 2020
@sbosnick sbosnick deleted the audit_uri_scheme branch May 9, 2020 13:18
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.

2 participants