From 0b37bb2bc25be8059e88a4139d9ab067d9600610 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Thu, 27 May 2021 14:03:35 +0200 Subject: Redefine `ErrorKind::Other` and stop using it in std. --- library/std/src/sys/unix/net.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/std/src/sys/unix/net.rs') diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/unix/net.rs index e6b61062d15..9db670408c3 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/unix/net.rs @@ -38,7 +38,7 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { str::from_utf8(CStr::from_ptr(libc::gai_strerror(err)).to_bytes()).unwrap().to_owned() }; Err(io::Error::new( - io::ErrorKind::Other, + io::ErrorKind::Unknown, &format!("failed to lookup address information: {}", detail)[..], )) } @@ -178,7 +178,7 @@ impl Socket { if pollfd.revents & libc::POLLHUP != 0 { let e = self.take_error()?.unwrap_or_else(|| { io::Error::new_const( - io::ErrorKind::Other, + io::ErrorKind::Unknown, &"no error set after POLLHUP", ) }); -- cgit 1.4.1-3-g733a5