diff options
Diffstat (limited to 'library/std/src/net/udp.rs')
| -rw-r--r-- | library/std/src/net/udp.rs | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/library/std/src/net/udp.rs b/library/std/src/net/udp.rs index 6df47d7b0e0..674c5fb7d6e 100644 --- a/library/std/src/net/udp.rs +++ b/library/std/src/net/udp.rs @@ -203,9 +203,7 @@ impl UdpSocket { pub fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A) -> io::Result<usize> { match addr.to_socket_addrs()?.next() { Some(addr) => self.0.send_to(buf, &addr), - None => { - Err(io::const_io_error!(ErrorKind::InvalidInput, "no addresses to send data to")) - } + None => Err(io::const_error!(ErrorKind::InvalidInput, "no addresses to send data to")), } } | 
