Skip to content

Commit 2a5e37e

Browse files
kvasilyealgesten
authored andcommitted
Fix for clippy
1 parent 0983033 commit 2a5e37e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/time_tricks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl SystemTimeExt for SystemTime {
136136
let secs_epoch = secs_ntp - SECS_1900 as f64;
137137

138138
// Duration not allowed to be negative
139-
let secs_dur = Duration::try_from_secs_f64(secs_epoch).unwrap_or_else(|_| Duration::ZERO);
139+
let secs_dur = Duration::try_from_secs_f64(secs_epoch).unwrap_or(Duration::ZERO);
140140

141141
// Time in SystemTime
142142
SystemTime::UNIX_EPOCH + secs_dur

0 commit comments

Comments
 (0)