rust/hg-cpython/src/dirstate.rs
changeset 48022 f2a9db29cb2d
parent 48021 627cd8f33db0
child 48025 631f6b445a77
--- a/rust/hg-cpython/src/dirstate.rs	Mon Sep 20 13:16:36 2021 +0200
+++ b/rust/hg-cpython/src/dirstate.rs	Fri Sep 17 13:33:45 2021 +0200
@@ -48,17 +48,17 @@
     py: Python,
     entry: &DirstateEntry,
 ) -> PyResult<PyObject> {
-    let &DirstateEntry {
-        state,
-        mode,
-        size,
-        mtime,
-    } = entry;
     // Explicitly go through u8 first, then cast to platform-specific `c_char`
     // because Into<u8> has a specific implementation while `as c_char` would
     // just do a naive enum cast.
-    let state_code: u8 = state.into();
-    make_dirstate_item_raw(py, state_code, mode, size, mtime)
+    let state_code: u8 = entry.state().into();
+    make_dirstate_item_raw(
+        py,
+        state_code,
+        entry.mode(),
+        entry.size(),
+        entry.mtime(),
+    )
 }
 
 pub fn make_dirstate_item_raw(