Mercurial > hg
changeset 49137:66e22a4d856b
rust: remove use of `EntryState` in `DirsMultiset`
Let's use the new API.
Differential Revision: https://phab.mercurial-scm.org/D12535
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 12 Apr 2022 17:27:56 +0200 |
parents | 3f5e207f78be |
children | c6c1caf28349 |
files | rust/hg-core/src/dirstate/dirs_multiset.rs |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/dirs_multiset.rs Tue Apr 12 17:26:23 2022 +0200 +++ b/rust/hg-core/src/dirstate/dirs_multiset.rs Tue Apr 12 17:27:56 2022 +0200 @@ -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 @@ 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 @@ #[cfg(test)] mod tests { + use crate::EntryState; + use super::*; #[test]