Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix unwrap in branch diff (#41330)

Conrad Irwin3a7bdf43f520
diff --git a/crates/project/src/git_store/branch_diff.rs b/crates/project/src/git_store/branch_diff.rs
index 554b5b83a10..08dbd77a541 100644
--- a/crates/project/src/git_store/branch_diff.rs
+++ b/crates/project/src/git_store/branch_diff.rs
@@ -274,9 +274,10 @@ impl BranchDiff {
.as_ref()
.and_then(|t| t.entries.get(&item.repo_path))
.cloned();
- let status = self
- .merge_statuses(Some(item.status), branch_diff.as_ref())
- .unwrap();
+ let Some(status) = self.merge_statuses(Some(item.status), branch_diff.as_ref())
+ else {
+ continue;
+ };
if !status.has_changes() {
continue;
}