# HG changeset patch # User Raphaël Gomès # Date 2022-04-12 15:25:38 # Node ID a1fce5003ff4354484763c06b65029985b598558 # Parent 8c59d8adcf5bfff15127bfe9105b340f904e0adc rust-hg-cpython: remove use of `EntryState` Let's use the new API Differential Revision: https://phab.mercurial-scm.org/D12533 diff --git a/rust/hg-cpython/src/dirstate/dirstate_map.rs b/rust/hg-cpython/src/dirstate/dirstate_map.rs --- a/rust/hg-cpython/src/dirstate/dirstate_map.rs +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs @@ -26,7 +26,7 @@ use hg::{ 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 @@ py_class!(pub class DirstateMap |py| { 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(