--- a/rust/hg-core/src/dirstate_tree/on_disk.rs Fri Oct 08 12:57:24 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs Tue Oct 12 15:29:05 2021 +0200
@@ -15,7 +15,7 @@
use format_bytes::format_bytes;
use std::borrow::Cow;
use std::convert::{TryFrom, TryInto};
-use std::time::{Duration, SystemTime, UNIX_EPOCH};
+use std::time::{SystemTime, UNIX_EPOCH};
/// Added at the start of `.hg/dirstate` when the "v2" format is used.
/// This a redundant sanity check more than an actual "magic number" since
@@ -462,18 +462,6 @@
}
}
-impl From<&'_ Timestamp> for SystemTime {
- fn from(timestamp: &'_ Timestamp) -> Self {
- let secs = timestamp.seconds.get();
- let nanos = timestamp.nanoseconds.get();
- if secs >= 0 {
- UNIX_EPOCH + Duration::new(secs as u64, nanos)
- } else {
- UNIX_EPOCH - Duration::new((-secs) as u64, nanos)
- }
- }
-}
-
fn read_hg_path(
on_disk: &[u8],
slice: PathSlice,