mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
avoid using both Some() and ? on linux/android/freebsd code
This commit is contained in:
parent
f75d02d669
commit
3cadc11d83
@ -25,7 +25,7 @@ pub fn futex_wait(futex: &AtomicU32, expected: u32, timeout: Option<Duration>) -
|
|||||||
//
|
//
|
||||||
// Overflows are rounded up to an infinite timeout (None).
|
// Overflows are rounded up to an infinite timeout (None).
|
||||||
let timespec = timeout
|
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());
|
.and_then(|t| t.to_timespec());
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
Loading…
Reference in New Issue
Block a user