From f3687c5f9e69452bbc9c1fa87089f3a8afd9bfc0 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Fri, 2 Feb 2024 20:05:29 +0000 Subject: [PATCH] refactor: replace deprecated indexmap method --- src/modules/launcher/item.rs | 2 +- src/modules/launcher/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/launcher/item.rs b/src/modules/launcher/item.rs index e75c306b..d312cd8f 100644 --- a/src/modules/launcher/item.rs +++ b/src/modules/launcher/item.rs @@ -52,7 +52,7 @@ impl Item { } pub fn unmerge_toplevel(&mut self, info: &ToplevelInfo) { - self.windows.remove(&info.id); + self.windows.shift_remove(&info.id); self.recalculate_open_state(); } diff --git a/src/modules/launcher/mod.rs b/src/modules/launcher/mod.rs index 764176f0..c231cc8e 100644 --- a/src/modules/launcher/mod.rs +++ b/src/modules/launcher/mod.rs @@ -204,7 +204,7 @@ impl Module for LauncherModule { item.unmerge_toplevel(&info); if item.windows.is_empty() { - items.remove(&info.app_id); + items.shift_remove(&info.app_id); Some(ItemOrWindowId::Item) } else { Some(ItemOrWindowId::Window) @@ -364,7 +364,7 @@ impl Module for LauncherModule { } } else { container.remove(&button.button); - buttons.remove(&app_id); + buttons.shift_remove(&app_id); } } } @@ -483,7 +483,7 @@ impl Module for LauncherModule { debug!("Removing window from popup for '{app_id}': {win_id}"); if let Some(buttons) = buttons.get_mut(&app_id) { - buttons.remove(&win_id); + buttons.shift_remove(&win_id); } } LauncherUpdate::Title(app_id, win_id, title) => {