Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/operations/dirstate_status.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 | 787ff5d21bcd |
children | 73ddcedeaadf |
line wrap: on
line diff
--- a/rust/hg-core/src/operations/dirstate_status.rs Tue Apr 13 17:02:58 2021 +0200 +++ b/rust/hg-core/src/operations/dirstate_status.rs Tue Apr 06 15:14:19 2021 +0200 @@ -5,17 +5,12 @@ // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. -use crate::dirstate::status::{build_response, Dispatch, HgPathCow, Status}; +use crate::dirstate::status::{build_response, Dispatch, Status}; use crate::matchers::Matcher; use crate::{DirstateStatus, StatusError}; -/// A tuple of the paths that need to be checked in the filelog because it's -/// ambiguous whether they've changed, and the rest of the already dispatched -/// files. -pub type LookupAndStatus<'a> = (Vec<HgPathCow<'a>>, DirstateStatus<'a>); - impl<'a, M: ?Sized + Matcher + Sync> Status<'a, M> { - pub(crate) fn run(&self) -> Result<LookupAndStatus<'a>, StatusError> { + pub(crate) fn run(&self) -> Result<DirstateStatus<'a>, StatusError> { let (traversed_sender, traversed_receiver) = crossbeam_channel::unbounded();