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:
parent
5bafb2b160
commit
534bb0620d
9 changed files with 80 additions and 94 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue