We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0983033 commit 2a5e37eCopy full SHA for 2a5e37e
src/util/time_tricks.rs
@@ -136,7 +136,7 @@ impl SystemTimeExt for SystemTime {
136
let secs_epoch = secs_ntp - SECS_1900 as f64;
137
138
// Duration not allowed to be negative
139
- let secs_dur = Duration::try_from_secs_f64(secs_epoch).unwrap_or_else(|_| Duration::ZERO);
+ let secs_dur = Duration::try_from_secs_f64(secs_epoch).unwrap_or(Duration::ZERO);
140
141
// Time in SystemTime
142
SystemTime::UNIX_EPOCH + secs_dur
0 commit comments