Skip to content

Commit 3cadc11

Browse files
committed
avoid using both Some() and ? on linux/android/freebsd code
1 parent f75d02d commit 3cadc11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/futex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn futex_wait(futex: &AtomicU32, expected: u32, timeout: Option<Duration>) -
2525
//
2626
// Overflows are rounded up to an infinite timeout (None).
2727
let timespec = timeout
28-
.and_then(|d| Some(Timespec::now(libc::CLOCK_MONOTONIC).checked_add_duration(&d)?))
28+
.and_then(|d| Timespec::now(libc::CLOCK_MONOTONIC).checked_add_duration(&d))
2929
.and_then(|t| t.to_timespec());
3030

3131
loop {

0 commit comments

Comments
 (0)