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

From impls of PathAndQuery and Authority for Uri #538

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

jeddenlea
Copy link
Contributor

A Uri may logically hold only an Authority or only a PathAndQuery.
Should an application want to make such Uris, it would be easier to
safely create them by first making just an Authority or just a
PathAndQuery, then cheaply convert them directly into a Uri.

@jeddenlea jeddenlea mentioned this pull request Apr 6, 2022
Copy link

@robjtede robjtede left a comment

Choose a reason for hiding this comment

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

Seems reasonable to add these shortcuts. Both forms are constructable in other ways.

Might be good to add a couple tests anyway just so that any future internal changes don't accidentally allow these impls to construct invalid URIs.

@jeddenlea
Copy link
Contributor Author

@seanmonstar #499 required 1.49, but it looks like the CI is still trying to build with 1.46.

@seanmonstar
Copy link
Member

I think it's because it's commits from before the updated MSRV. The list says 1.49 is required but not running.

A Uri may logically hold only an Authority or only a PathAndQuery.
Should an application want to make such Uris, it would be easier to
safely create them by first making just an Authority or just a
PathAndQuery, then cheaply convert them directly into a Uri.
The doc comments for `impl From<Uri> for Parts` actually described
`Uri::from_parts`.
@jeddenlea
Copy link
Contributor Author

That makes sense too... I've rebased.

@seanmonstar seanmonstar merged commit c1f309e into hyperium:master Apr 28, 2022
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.

3 participants