From c1f53358ba010e36950a9686e1b3b93cadc72c1c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 21 Mar 2023 15:47:02 -0700 Subject: [PATCH] Remove unnecessary Arc around background scanner's snapshot --- crates/project/src/worktree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 90da3253d57b539aecc3c8e73651974045ce8b3b..76273689349ab5b6b1d987858d4323b30bc034ed 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -2140,7 +2140,7 @@ impl<'a> sum_tree::Dimension<'a, EntrySummary> for PathKey { struct BackgroundScanner { fs: Arc, - snapshot: Arc>, + snapshot: Mutex, changes: HashMap, PathChange>, notify: UnboundedSender, executor: Arc, @@ -2155,7 +2155,7 @@ impl BackgroundScanner { ) -> Self { Self { fs, - snapshot: Arc::new(Mutex::new(snapshot)), + snapshot: Mutex::new(snapshot), notify, executor, changes: Default::default(),