# HG changeset patch # User Raphaël Gomès # Date 2022-04-12 15:27:56 # Node ID 66e22a4d856b0bd4434099182141b2be1122e44d # Parent 3f5e207f78bea65df348b345855cda4b2376e749 rust: remove use of `EntryState` in `DirsMultiset` Let's use the new API. Differential Revision: https://phab.mercurial-scm.org/D12535 diff --git a/rust/hg-core/src/dirstate/dirs_multiset.rs b/rust/hg-core/src/dirstate/dirs_multiset.rs --- a/rust/hg-core/src/dirstate/dirs_multiset.rs +++ b/rust/hg-core/src/dirstate/dirs_multiset.rs @@ -10,7 +10,6 @@ //! Used to counts the references to directories in a manifest or dirstate. use crate::dirstate_tree::on_disk::DirstateV2ParseError; use crate::{ - dirstate::EntryState, utils::{ files, hg_path::{HgPath, HgPathBuf, HgPathError}, @@ -49,7 +48,7 @@ impl DirsMultiset { let filename = filename.as_ref(); // This `if` is optimized out of the loop if only_tracked { - if entry.state() != EntryState::Removed { + if !entry.removed() { multiset.add_path(filename)?; } } else { @@ -215,6 +214,8 @@ impl<'a> DirsChildrenMultiset<'a> { #[cfg(test)] mod tests { + use crate::EntryState; + use super::*; #[test]