Use unsigned_abs instead of casting from i64 to u64

This commit is contained in:
Victor Song 2022-09-30 23:06:08 -04:00
parent 2917062466
commit 7595289698

View File

@ -375,7 +375,7 @@ impl<'dir> File<'dir> {
nanosec -= 1_000_000_000;
}
let duration = Duration::new(sec.abs() as u64, nanosec.abs() as u32);
let duration = Duration::new(sec.unsigned_abs(), nanosec.unsigned_abs() as u32);
Some(UNIX_EPOCH - duration)
}
else {