diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 07ff04e32abc19..789652b331cd64 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -344,13 +344,9 @@ impl SystemWindowTabController { let tab_group = self .tab_groups .iter() - .find_map(|(group, tabs)| tabs.iter().find(|tab| tab.id == id).map(|_| *group)); + .find_map(|(group, tabs)| tabs.iter().find(|tab| tab.id == id).map(|_| *group))?; - if let Some(tab_group) = tab_group { - self.tab_groups.get(&tab_group) - } else { - None - } + self.tab_groups.get(&tab_group) } /// Initialize the visibility of the system window tab controller.