Skip to content

Commit

Permalink
Clarify that send_to might return an error in certain cases
Browse files Browse the repository at this point in the history
Closes #34202
  • Loading branch information
achanda committed Nov 9, 2016
1 parent 46d39f3 commit 50bfc23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libstd/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ impl UdpSocket {
///
/// Address type can be any implementor of `ToSocketAddrs` trait. See its
/// documentation for concrete examples.
/// This will return an error when the IP version of the local socket
/// does not match that returned from `ToSocketAddrs`
/// See https://github.com/rust-lang/rust/issues/34202 for more details.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A)
-> io::Result<usize> {
Expand Down

0 comments on commit 50bfc23

Please sign in to comment.