From e1c194ce67cc0314ee3dcf6dfc1b030b651b92df Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Thu, 3 Aug 2023 08:23:59 -0700 Subject: [PATCH] working_copy: rename `WorkItem` -> `DirectoryToVisit` --- lib/src/working_copy.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index 8406aaf5a..4b7bb83db 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -386,7 +386,7 @@ pub enum ResetError { TreeStateError(#[from] TreeStateError), } -struct WorkItem { +struct DirectoryToVisit { dir: RepoPath, disk_dir: PathBuf, git_ignore: Arc, @@ -651,7 +651,7 @@ impl TreeState { }); let matcher = IntersectionMatcher::new(sparse_matcher.as_ref(), fsmonitor_matcher); - let work_item = WorkItem { + let directory_to_visit = DirectoryToVisit { dir: RepoPath::root(), disk_dir: self.working_copy_path.clone(), git_ignore: base_ignores, @@ -667,7 +667,7 @@ impl TreeState { tree_entries_tx, file_states_tx, deleted_files_tx, - work_item, + directory_to_visit, progress, )?; @@ -702,14 +702,14 @@ impl TreeState { tree_entries_tx: Sender<(RepoPath, TreeValue)>, file_states_tx: Sender<(RepoPath, FileState)>, deleted_files_tx: Sender, - work_item: WorkItem, + directory_to_visit: DirectoryToVisit, progress: Option<&SnapshotProgress>, ) -> Result<(), SnapshotError> { - let WorkItem { + let DirectoryToVisit { dir, disk_dir, git_ignore, - } = work_item; + } = directory_to_visit; if matcher.visit(&dir).is_nothing() { return Ok(()); @@ -796,7 +796,7 @@ impl TreeState { } } } else { - let work_item = WorkItem { + let directory_to_visit = DirectoryToVisit { dir: path, disk_dir: entry.path(), git_ignore: git_ignore.clone(), @@ -807,7 +807,7 @@ impl TreeState { tree_entries_tx.clone(), file_states_tx.clone(), deleted_files_tx.clone(), - work_item, + directory_to_visit, progress, )?; }