Skip to content

Commit

Permalink
Use shift_remove instead of deprecated IndexMap::remove (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusGix authored Jan 29, 2024
1 parent 11b9b1f commit 88d6b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/window_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ impl WindowHandle {
cx.app_state.request_all(self.id);
}
UpdateMessage::RemoveOverlay { id } => {
let mut overlay = self.view.overlays.remove(&id).unwrap();
let mut overlay = self.view.overlays.shift_remove(&id).unwrap();
cx.app_state.remove_view(&mut overlay);
overlay.scope.dispose();
cx.app_state.request_all(self.id);
Expand Down

0 comments on commit 88d6b60

Please sign in to comment.