comparison rust/hg-core/src/dirstate_tree/dispatch.rs @ 47110:9c6b458a08e1

rust: Move "lookup" a.k.a. "unsure" paths into `DirstateStatus` struct Instead of having `status()` returning a tuple of those paths and `DirstateStatus`. Differential Revision: https://phab.mercurial-scm.org/D10494
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 06 Apr 2021 15:14:19 +0200
parents 33e5511b571a
children d5956136d19d
comparison
equal deleted inserted replaced
47109:33e5511b571a 47110:9c6b458a08e1
9 use crate::DirstateMap; 9 use crate::DirstateMap;
10 use crate::DirstateMapError; 10 use crate::DirstateMapError;
11 use crate::DirstateParents; 11 use crate::DirstateParents;
12 use crate::DirstateStatus; 12 use crate::DirstateStatus;
13 use crate::EntryState; 13 use crate::EntryState;
14 use crate::HgPathCow;
15 use crate::PatternFileWarning; 14 use crate::PatternFileWarning;
16 use crate::StateMapIter; 15 use crate::StateMapIter;
17 use crate::StatusError; 16 use crate::StatusError;
18 use crate::StatusOptions; 17 use crate::StatusOptions;
19 18
100 &'a self, 99 &'a self,
101 matcher: &'a (dyn Matcher + Sync), 100 matcher: &'a (dyn Matcher + Sync),
102 root_dir: PathBuf, 101 root_dir: PathBuf,
103 ignore_files: Vec<PathBuf>, 102 ignore_files: Vec<PathBuf>,
104 options: StatusOptions, 103 options: StatusOptions,
105 ) -> Result< 104 ) -> Result<(DirstateStatus<'a>, Vec<PatternFileWarning>), StatusError>;
106 (
107 (Vec<HgPathCow<'a>>, DirstateStatus<'a>),
108 Vec<PatternFileWarning>,
109 ),
110 StatusError,
111 >;
112 105
113 fn copy_map_len(&self) -> usize; 106 fn copy_map_len(&self) -> usize;
114 107
115 fn copy_map_iter(&self) -> CopyMapIter<'_>; 108 fn copy_map_iter(&self) -> CopyMapIter<'_>;
116 109
268 &'a self, 261 &'a self,
269 matcher: &'a (dyn Matcher + Sync), 262 matcher: &'a (dyn Matcher + Sync),
270 root_dir: PathBuf, 263 root_dir: PathBuf,
271 ignore_files: Vec<PathBuf>, 264 ignore_files: Vec<PathBuf>,
272 options: StatusOptions, 265 options: StatusOptions,
273 ) -> Result< 266 ) -> Result<(DirstateStatus<'a>, Vec<PatternFileWarning>), StatusError>
274 ( 267 {
275 (Vec<HgPathCow<'a>>, DirstateStatus<'a>),
276 Vec<PatternFileWarning>,
277 ),
278 StatusError,
279 > {
280 crate::status(self, matcher, root_dir, ignore_files, options) 268 crate::status(self, matcher, root_dir, ignore_files, options)
281 } 269 }
282 270
283 fn copy_map_len(&self) -> usize { 271 fn copy_map_len(&self) -> usize {
284 self.copy_map.len() 272 self.copy_map.len()