rust/hg-core/src/dirstate_tree/on_disk.rs
changeset 48263 83d0bd45b662
parent 48261 9205d9be8b41
child 48264 bb240915f69f
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs	Thu Oct 14 13:54:39 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs	Wed Oct 13 15:58:14 2021 +0200
@@ -376,15 +376,7 @@
             // MTIME_SECOND_AMBIGUOUS requires. So we ignore the mtime
             && !self.flags().contains(Flags::MTIME_SECOND_AMBIGUOUS)
         {
-            // TODO: replace this by `self.mtime.try_into()?` to use
-            // sub-second precision from the file.
-            // We don’t do this yet because other parts of the code
-            // always set it to zero.
-            let mtime = TruncatedTimestamp::from_already_truncated(
-                self.mtime.truncated_seconds.get(),
-                0,
-            )?;
-            Some(mtime)
+            Some(self.mtime.try_into()?)
         } else {
             None
         };