Skip to content

Commit

Permalink
order of placed_items vec in layout is now preserved when removing items
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenGar committed Mar 26, 2024
1 parent f3cd210 commit ca946d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jagua-rs/src/entities/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Layout {
.iter()
.position(|pi| &pi.uid == pi_uid)
.expect("placed item does not exist");
let p_item = self.placed_items.swap_remove(pos);
let p_item = self.placed_items.remove(pos);
// update the collision detection engine

let hazard_entity = p_item.uid.clone().into();
Expand Down

0 comments on commit ca946d9

Please sign in to comment.