rust/hg-cpython/src/parsers.rs
changeset 47101 5d62243c7732
parent 46595 98a455a62699
child 47351 3b9914b28133
--- a/rust/hg-cpython/src/parsers.rs	Tue Apr 06 21:07:12 2021 +0200
+++ b/rust/hg-cpython/src/parsers.rs	Mon Apr 12 14:43:45 2021 +0200
@@ -14,13 +14,13 @@
     PythonObject, ToPyObject,
 };
 use hg::{
-    pack_dirstate, parse_dirstate, utils::hg_path::HgPathBuf, DirstateEntry,
-    DirstateParents, FastHashMap, PARENT_SIZE,
+    dirstate::parsers::Timestamp, pack_dirstate, parse_dirstate,
+    utils::hg_path::HgPathBuf, DirstateEntry, DirstateParents, FastHashMap,
+    PARENT_SIZE,
 };
 use std::convert::TryInto;
 
 use crate::dirstate::{extract_dirstate, make_dirstate_tuple};
-use std::time::Duration;
 
 fn parse_dirstate_wrapper(
     py: Python,
@@ -98,7 +98,7 @@
             p1: p1.try_into().unwrap(),
             p2: p2.try_into().unwrap(),
         },
-        Duration::from_secs(now.as_object().extract::<u64>(py)?),
+        Timestamp(now.as_object().extract::<u64>(py)?),
     ) {
         Ok(packed) => {
             for (filename, entry) in dirstate_map.iter() {