Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove an unnecessary clone in `get_permalink_to_line` (#22027)
Michael Sloan7e6233d70f32
diff --git a/crates/project/src/buffer_store.rs b/crates/project/src/buffer_store.rsindex d6932e31b22..3abc794d041 100644--- a/crates/project/src/buffer_store.rs+++ b/crates/project/src/buffer_store.rs@@ -1211,7 +1211,7 @@ impl BufferStore {return Task::ready(Err(anyhow!("buffer has no file")));};- match file.worktree.clone().read(cx) {+ match file.worktree.read(cx) {Worktree::Local(worktree) => {let Some(repo) = worktree.local_git_repo(file.path()) else {return Task::ready(Err(anyhow!("no repository for buffer found")));