Skip to content

Commit 3b866b0

Browse files
committed
Make UnixStream::take_error return None on redox
1 parent 2394549 commit 3b866b0

File tree

1 file changed

+3
-3
lines changed
  • src/libstd/sys/redox/ext

1 file changed

+3
-3
lines changed

src/libstd/sys/redox/ext/net.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl UnixStream {
352352
/// ```
353353
#[stable(feature = "unix_socket", since = "1.10.0")]
354354
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
355-
Err(Error::new(ErrorKind::Other, "UnixStream::take_error unimplemented on redox"))
355+
Ok(None)
356356
}
357357

358358
/// Shuts down the read, write, or both halves of this connection.
@@ -373,7 +373,7 @@ impl UnixStream {
373373
/// socket.shutdown(Shutdown::Both).expect("shutdown function failed");
374374
/// ```
375375
#[stable(feature = "unix_socket", since = "1.10.0")]
376-
pub fn shutdown(&self, how: Shutdown) -> io::Result<()> {
376+
pub fn shutdown(&self, _how: Shutdown) -> io::Result<()> {
377377
Err(Error::new(ErrorKind::Other, "UnixStream::shutdown unimplemented on redox"))
378378
}
379379
}
@@ -607,7 +607,7 @@ impl UnixListener {
607607
/// ```
608608
#[stable(feature = "unix_socket", since = "1.10.0")]
609609
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
610-
Err(Error::new(ErrorKind::Other, "UnixListener::take_error unimplemented on redox"))
610+
Ok(None)
611611
}
612612

613613
/// Returns an iterator over incoming connections.

0 commit comments

Comments
 (0)