Skip to content

Implement ToSocketAddrs for &[SocketAddr] #31161

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

Merged
merged 1 commit into from
Feb 4, 2016

Conversation

sfackler
Copy link
Member

This is useful when you have an API that takes a T: ToSocketAddrs and needs to turn that into an owned value which will be passed to another API taking T: ToSocketAddrs at a later time, for example: https://github.com/sfackler/rust-hyper-socks/blob/master/src/lib.rs#L15

@rust-highfive
Copy link
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

I think make tidy is failing due to the feature name, but otherwise seems fine to me. Probably worth discussing at a libs triage as it'll be insta-stable.

@alexcrichton alexcrichton added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jan 24, 2016
@sfackler sfackler force-pushed the slice-to-socket-addrs branch from aac518b to 783a0ba Compare January 24, 2016 19:24
@sfackler sfackler added the I-needs-decision Issue: In need of a decision. label Jan 24, 2016
@@ -457,6 +459,15 @@ impl ToSocketAddrs for str {
}
}

#[stable(feature = "slice-to-socket-addrs", since = "1.8.0")]
Copy link
Member

Choose a reason for hiding this comment

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

Currently we require feature names to be valid rust identifiers, so could this change - to _?

@alexcrichton
Copy link
Member

The libs team discussed this during triage today and the decision was that this seems like fine functionality to have.

r=me with the minor nit update (which I think made travis fail?)

@alexcrichton alexcrichton removed I-needs-decision Issue: In need of a decision. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Feb 4, 2016
@sfackler sfackler force-pushed the slice-to-socket-addrs branch from 783a0ba to 7ea0abf Compare February 4, 2016 09:44
@sfackler
Copy link
Member Author

sfackler commented Feb 4, 2016

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Feb 4, 2016

📌 Commit 7ea0abf has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Feb 4, 2016

⌛ Testing commit 7ea0abf with merge e64ca8c...

bors added a commit that referenced this pull request Feb 4, 2016
This is useful when you have an API that takes a `T: ToSocketAddrs` and needs to turn that into an owned value which will be passed to another API taking `T: ToSocketAddrs` at a later time, for example: https://github.com/sfackler/rust-hyper-socks/blob/master/src/lib.rs#L15
@bors bors merged commit 7ea0abf into rust-lang:master Feb 4, 2016
@sfackler sfackler deleted the slice-to-socket-addrs branch November 26, 2016 05:50
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.

5 participants