From 7447dc81d94863c4bf24b46fc68dc7ab1680ecb1 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Tue, 26 Aug 2025 15:49:21 -0600 Subject: [PATCH] Clippy --- crates/outline_panel/src/outline_panel.rs | 2 +- crates/project/src/git_store.rs | 4 ++-- crates/zeta/src/zeta.rs | 8 +------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rs index a82dd5dd4bbbc93a150ead6af23169432087453e..822c8920816523d85aef16e56ab015e28d0ec465 100644 --- a/crates/outline_panel/src/outline_panel.rs +++ b/crates/outline_panel/src/outline_panel.rs @@ -2693,7 +2693,7 @@ impl OutlinePanel { let status = git_store .read(cx) .repository_and_path_for_buffer_id(buffer_id, cx) - .and_then(|(repo, path)| Some(repo.read(cx).status_for_path(&path)?)); + .and_then(|(repo, path)| repo.read(cx).status_for_path(&path)); buffer_excerpts .entry(buffer_id) .or_insert_with(|| { diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 9b51d7b73270b03676cbe7843c4f8db185f94a48..51ab3252cbec04db5cef93f97dba7c77a22daee9 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -809,7 +809,7 @@ impl GitStore { cx: &App, ) -> Option { let (repo, repo_path) = self.repository_and_path_for_project_path(project_path, cx)?; - Some(repo.read(cx).status_for_path(&repo_path)?) + repo.read(cx).status_for_path(&repo_path) } pub fn checkpoint(&self, cx: &mut App) -> Task> { @@ -2846,7 +2846,7 @@ impl RepositorySnapshot { pub fn status_for_path(&self, path: &RepoPath) -> Option { self.statuses_by_path .get(&PathKey(path.0.clone()), &()) - .map(|entry| entry.status.clone()) + .map(|entry| entry.status) } pub fn abs_path_to_repo_path(&self, abs_path: &Path) -> Option { diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index c5eb2b4bab8cbfc97e6788ab38b5b56bed41f24b..79864fd21e7ed3030e9bd09722f851fb1b6244f8 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -432,13 +432,7 @@ impl Zeta { let cursor_point = cursor.to_point(&snapshot); let cursor_offset = cursor_point.to_offset(&snapshot); let git_info = if matches!(can_collect_data, CanCollectData(true)) { - self.gather_git_info( - cursor_point.clone(), - &buffer_snapshotted_at, - &snapshot, - project.clone(), - cx, - ) + self.gather_git_info(cursor_point, &buffer_snapshotted_at, &snapshot, project, cx) } else { None };