From 3b866b0ea44a27e8fa1f7bedabb42c92b670d467 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Thu, 14 Jun 2018 11:17:08 +0200 Subject: [PATCH] Make UnixStream::take_error return None on redox --- src/libstd/sys/redox/ext/net.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstd/sys/redox/ext/net.rs b/src/libstd/sys/redox/ext/net.rs index 78ed8194088d..abfbfaa8dbb4 100644 --- a/src/libstd/sys/redox/ext/net.rs +++ b/src/libstd/sys/redox/ext/net.rs @@ -352,7 +352,7 @@ impl UnixStream { /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] pub fn take_error(&self) -> io::Result> { - Err(Error::new(ErrorKind::Other, "UnixStream::take_error unimplemented on redox")) + Ok(None) } /// Shuts down the read, write, or both halves of this connection. @@ -373,7 +373,7 @@ impl UnixStream { /// socket.shutdown(Shutdown::Both).expect("shutdown function failed"); /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] - pub fn shutdown(&self, how: Shutdown) -> io::Result<()> { + pub fn shutdown(&self, _how: Shutdown) -> io::Result<()> { Err(Error::new(ErrorKind::Other, "UnixStream::shutdown unimplemented on redox")) } } @@ -607,7 +607,7 @@ impl UnixListener { /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] pub fn take_error(&self) -> io::Result> { - Err(Error::new(ErrorKind::Other, "UnixListener::take_error unimplemented on redox")) + Ok(None) } /// Returns an iterator over incoming connections.