Skip to content

Commit

Permalink
refactor: replace deprecated indexmap method
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed Feb 2, 2024
1 parent 4934f2c commit f3687c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/launcher/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
6 changes: 3 additions & 3 deletions src/modules/launcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl Module<gtk::Box> 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)
Expand Down Expand Up @@ -364,7 +364,7 @@ impl Module<gtk::Box> for LauncherModule {
}
} else {
container.remove(&button.button);
buttons.remove(&app_id);
buttons.shift_remove(&app_id);
}
}
}
Expand Down Expand Up @@ -483,7 +483,7 @@ impl Module<gtk::Box> 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) => {
Expand Down

0 comments on commit f3687c5

Please sign in to comment.