Mercurial > hg-stable
changeset 49178:afe60def963d
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
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 29 Mar 2022 17:23:24 +0200 |
parents | 861dd252e2dc |
children | d9a66d62c604 |
files | rust/hg-core/src/dirstate_tree/dirstate_map.rs |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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,