Function mz_ore::vec::swap_remove_multiple

source ·
pub fn swap_remove_multiple<T>(v: &mut Vec<T>, indexes: Vec<usize>) -> Vec<T>
Expand description

Remove the elements from v at the positions indicated by indexes, and return the removed elements in a new vector.

indexes shouldn’t have duplicates. (Might panic or behave incorrectly in case of duplicates.)