From 5909d1258b9e14394873cc27d0452c0621e3e589 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Fri, 11 Apr 2025 14:05:51 -0400 Subject: [PATCH] Fix a panic in the git store (#28590) Closes #ISSUE Release Notes: - Fixed a panic that could occur when git statuses were updated. --- crates/project/src/git_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 9a1683b3793aa6ae6e10dd99c1f9cd37f565e6b1..b0b35c52bcdb0076109b59ac1ae4b44ba713f6bf 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -4048,7 +4048,7 @@ impl Repository { for (repo_path, status) in &*statuses.entries { changed_paths.remove(repo_path); if cursor.seek_forward(&PathTarget::Path(repo_path), Bias::Left, &()) { - if &cursor.item().unwrap().status == status { + if cursor.item().is_some_and(|entry| entry.status == *status) { continue; } }