Skip to content

Commit 844c6fc

Browse files
committed
refactor(core): address the cast_abs_to_unsigned clippy lint
1 parent 7fc4ef0 commit 844c6fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/r3_core/src/time/duration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl TryFrom<Duration> for core::time::Duration {
222222

223223
impl fmt::Debug for Duration {
224224
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
225-
let abs_dur = core::time::Duration::from_micros((self.micros as i64).abs() as u64);
225+
let abs_dur = core::time::Duration::from_micros(self.micros.unsigned_abs().into());
226226
if self.micros < 0 {
227227
write!(f, "-")?;
228228
}

0 commit comments

Comments
 (0)