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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user