File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const TIMESPEC_MAX: libc::timespec =
13
13
libc:: timespec { tv_sec : <libc:: time_t >:: MAX , tv_nsec : 1_000_000_000 - 1 } ;
14
14
15
15
fn saturating_cast_to_time_t ( value : u64 ) -> libc:: time_t {
16
- if value > <libc :: time_t > :: MAX as u64 { < libc:: time_t > :: MAX } else { value as libc :: time_t }
16
+ crate :: cmp :: min ( value , libc:: time_t:: MAX as u64 ) as _
17
17
}
18
18
19
19
impl Condvar {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const TIMESPEC_MAX: libc::timespec =
13
13
libc:: timespec { tv_sec : <libc:: time_t >:: MAX , tv_nsec : 1_000_000_000 - 1 } ;
14
14
15
15
fn saturating_cast_to_time_t ( value : u64 ) -> libc:: time_t {
16
- if value > <libc :: time_t > :: MAX as u64 { < libc:: time_t > :: MAX } else { value as libc :: time_t }
16
+ crate :: cmp :: min ( value , libc:: time_t:: MAX as u64 ) as _
17
17
}
18
18
19
19
impl Condvar {
You can’t perform that action at this time.
0 commit comments