-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
I think |
aac518b
to
783a0ba
Compare
@@ -457,6 +459,15 @@ impl ToSocketAddrs for str { | |||
} | |||
} | |||
|
|||
#[stable(feature = "slice-to-socket-addrs", since = "1.8.0")] |
There was a problem hiding this comment.
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 _
?
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?) |
783a0ba
to
7ea0abf
Compare
@bors r=alexcrichton |
📌 Commit 7ea0abf has been approved by |
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
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 takingT: ToSocketAddrs
at a later time, for example: https://github.com/sfackler/rust-hyper-socks/blob/master/src/lib.rs#L15