Use read() over read_with() to improve readability in simple cases (#31455)

Follow up to: #31263 

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons
2025-05-26 16:14:07 -04:00
committed by GitHub
parent 5bafb2b160
commit 534bb0620d
9 changed files with 80 additions and 94 deletions
+1 -3
View File
@@ -3870,9 +3870,7 @@ impl Project {
}
pub fn find_worktree(&self, abs_path: &Path, cx: &App) -> Option<(Entity<Worktree>, PathBuf)> {
self.worktree_store.read_with(cx, |worktree_store, cx| {
worktree_store.find_worktree(abs_path, cx)
})
self.worktree_store.read(cx).find_worktree(abs_path, cx)
}
pub fn is_shared(&self) -> bool {