Change summary
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(-)
Detailed changes
@@ -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(|| {
@@ -809,7 +809,7 @@ impl GitStore {
cx: &App,
) -> Option<FileStatus> {
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<Result<GitStoreCheckpoint>> {
@@ -2846,7 +2846,7 @@ impl RepositorySnapshot {
pub fn status_for_path(&self, path: &RepoPath) -> Option<FileStatus> {
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<RepoPath> {
@@ -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
};