std: update internal uses of io::const_error!
This commit is contained in:
@@ -84,6 +84,6 @@ where
|
||||
}
|
||||
}
|
||||
Err(last_err.unwrap_or_else(|| {
|
||||
io::const_io_error!(ErrorKind::InvalidInput, "could not resolve to any addresses")
|
||||
io::const_error!(ErrorKind::InvalidInput, "could not resolve to any addresses")
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user