From 515fb02049d82141ed385afb4a5e392dd35f822f Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Tue, 1 Aug 2023 18:16:56 -0700 Subject: [PATCH] working_copy: extract `WorkItem` to top-level `struct` --- lib/src/working_copy.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index 1a0846aff..f3a54649a 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -383,6 +383,12 @@ pub enum ResetError { TreeStateError(#[from] TreeStateError), } +struct WorkItem { + dir: RepoPath, + disk_dir: PathBuf, + git_ignore: Arc, +} + #[derive(Debug, Error)] pub enum TreeStateError { #[error("Reading tree state from {path}: {source}")] @@ -642,11 +648,6 @@ impl TreeState { }); let matcher = IntersectionMatcher::new(sparse_matcher.as_ref(), fsmonitor_matcher); - struct WorkItem { - dir: RepoPath, - disk_dir: PathBuf, - git_ignore: Arc, - } let mut work = vec![WorkItem { dir: RepoPath::root(), disk_dir: self.working_copy_path.clone(),