From 819bb2663dbc5bb4f4f91f68fa73682e97be5b57 Mon Sep 17 00:00:00 2001 From: Vladas Zakrevskis <146100@gmail.com> Date: Fri, 31 May 2024 03:50:03 +0100 Subject: [PATCH] Fix recent project index order (#12507) Fixed bug introduced in: https://github.com/zed-industries/zed/pull/12502 Filtering before `enumerate` call breaks project order and instead of hiding current project it hides some other project. Release Notes: - N/A --- crates/recent_projects/src/recent_projects.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs index 6aa88ce93f..880defbf70 100644 --- a/crates/recent_projects/src/recent_projects.rs +++ b/crates/recent_projects/src/recent_projects.rs @@ -228,8 +228,8 @@ impl PickerDelegate for RecentProjectsDelegate { let candidates = self .workspaces .iter() - .filter(|(id, _)| !self.is_current_workspace(*id, cx)) .enumerate() + .filter(|(_, (id, _))| !self.is_current_workspace(*id, cx)) .map(|(id, (_, location))| { let combined_string = match location { SerializedWorkspaceLocation::Local(paths, _) => paths