changeset 49190:a1fce5003ff4

rust-hg-cpython: remove use of `EntryState` Let's use the new API Differential Revision: https://phab.mercurial-scm.org/D12533
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 12 Apr 2022 17:25:38 +0200
parents 8c59d8adcf5b
children 3f5e207f78be
files rust/hg-cpython/src/dirstate/dirstate_map.rs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs	Fri Apr 08 18:10:12 2022 +0200
+++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs	Tue Apr 12 17:25:38 2022 +0200
@@ -26,7 +26,7 @@
     dirstate::StateMapIter, dirstate_tree::on_disk::DirstateV2ParseError,
     dirstate_tree::owning::OwningDirstateMap, revlog::Node,
     utils::files::normalize_case, utils::hg_path::HgPath, DirstateEntry,
-    DirstateError, DirstateParents, EntryState,
+    DirstateError, DirstateParents,
 };
 
 // TODO
@@ -269,7 +269,7 @@
         let dict = PyDict::new(py);
         for item in self.inner(py).borrow_mut().iter() {
             let (path, entry) = item.map_err(|e| v2_error(py, e))?;
-            if entry.state() != EntryState::Removed {
+            if !entry.removed() {
                 let key = normalize_case(path);
                 let value = path;
                 dict.set_item(