about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSébastien Marie <semarie@online.fr>2022-05-11 04:50:48 +0000
committerSébastien Marie <semarie@online.fr>2022-05-11 04:50:48 +0000
commit3cadc11d838d5f07b2849ba148dfb83c006fb70f (patch)
treeacc1c009608a472e7df385006896afe32d836adb
parentf75d02d66975bed3636e89f56077bbc53fe5f74d (diff)
downloadrust-3cadc11d838d5f07b2849ba148dfb83c006fb70f.tar.gz
rust-3cadc11d838d5f07b2849ba148dfb83c006fb70f.zip
avoid using both Some() and ? on linux/android/freebsd code
-rw-r--r--library/std/src/sys/unix/futex.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/futex.rs b/library/std/src/sys/unix/futex.rs
index d70108e7bd6..8d05cb44b94 100644
--- a/library/std/src/sys/unix/futex.rs
+++ b/library/std/src/sys/unix/futex.rs
@@ -25,7 +25,7 @@ pub fn futex_wait(futex: &AtomicU32, expected: u32, timeout: Option<Duration>) -
     //
     // Overflows are rounded up to an infinite timeout (None).
     let timespec = timeout
-        .and_then(|d| Some(Timespec::now(libc::CLOCK_MONOTONIC).checked_add_duration(&d)?))
+        .and_then(|d| Timespec::now(libc::CLOCK_MONOTONIC).checked_add_duration(&d))
         .and_then(|t| t.to_timespec());
 
     loop {