Skip to content

Implement Display for Host and HostAndPort #300

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

Closed
brson opened this issue May 4, 2017 · 4 comments
Closed

Implement Display for Host and HostAndPort #300

brson opened this issue May 4, 2017 · 4 comments

Comments

@brson
Copy link
Contributor

brson commented May 4, 2017

Probably using the obvious serialization for "host:port". Looks like HostAndPort impl needs to be parameterized over S: Display.

@SimonSapin
Copy link
Member

For IPv6 addresses, using [] brackets is necessary to distinguish : within an address and : separating an address and port number. Display for Host already does this.

@luisbg
Copy link

luisbg commented May 20, 2017

Is anybody working on this?

kichristensen added a commit to kichristensen/rust-url that referenced this issue Jun 9, 2017
bors-servo pushed a commit that referenced this issue Jun 13, 2017
Add Display for HostAndPort

Fix #300

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/328)
<!-- Reviewable:end -->
@SimonSapin
Copy link
Member

I kinda regret making HostAndPort a custom type rather than a tuple and I think making it implement Display just because is kind of cargo-culting, but whatever.

@luisbg
Copy link

luisbg commented Jun 13, 2017

Cool to see this added. Thanks @SimonSapin

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 a pull request may close this issue.

3 participants