rust-dirstatemap: use `DirstateEntry::tracked` directly
`state()` is a legacy API that will be removed at some point, let's use the
newer API.
Differential Revision: https://phab.mercurial-scm.org/D12521
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Mar 29 00:58:58 2022 +0200
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Mar 29 17:23:24 2022 +0200
@@ -988,9 +988,7 @@
&mut self,
filename: &HgPath,
) -> Result<(), DirstateError> {
- let was_tracked = self
- .get(filename)?
- .map_or(false, |e| e.state().is_tracked());
+ let was_tracked = self.get(filename)?.map_or(false, |e| e.tracked());
struct Dropped {
was_tracked: bool,
had_entry: bool,