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

Add convenience Uri getters #287

Merged
merged 1 commit into from Jan 8, 2019
Merged

Add convenience Uri getters #287

merged 1 commit into from Jan 8, 2019

Conversation

seanmonstar
Copy link
Member

Parts of the Uri that now have specific types meant that several
methods were deprecated, such as Uri::scheme() for
Uri::scheme_part(). This means that many use-cases have extra
mapping code to get the original value.

This adds convenience getters to reduce the need to map when the actual
type is not needed:

  • scheme_str
  • port_u16

Parts of the `Uri` that now have specific types meant that several
methods were deprecated, such as `Uri::scheme()` for
`Uri::scheme_part()`. This means that many use-cases have extra
`map`ping code to get the original value.

This adds convenience getters to reduce the need to map when the actual
type is not needed:

- `scheme_str`
- `port_u16`
@seanmonstar seanmonstar merged commit 4644dae into master Jan 8, 2019
@seanmonstar seanmonstar deleted the uri-ergo-getters branch January 8, 2019 00: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.

None yet

2 participants