mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Remove unwrap in GitTraversal::synchronize_statuses (#23555)
Release Notes: - Fixed a potential panic in handling of Git statuses. Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
1ac7da8473
commit
75ae4dada4
1 changed files with 2 additions and 1 deletions
|
@ -5725,7 +5725,8 @@ impl<'a> GitTraversal<'a> {
|
|||
} else if entry.is_file() {
|
||||
// For a file entry, park the cursor on the corresponding status
|
||||
if statuses.seek_forward(&PathTarget::Path(repo_path.as_ref()), Bias::Left, &()) {
|
||||
self.current_entry_summary = Some(statuses.item().unwrap().status.into());
|
||||
// TODO: Investigate statuses.item() being None here.
|
||||
self.current_entry_summary = statuses.item().map(|item| item.status.into());
|
||||
} else {
|
||||
self.current_entry_summary = Some(GitSummary::UNCHANGED);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue