In Rust, is there an in built function for finding and removing elements of a vector, both simultaneously and as separate actions?
For example:
for f in factors {
if f in list {
list.remove(f);
}
}
Currently, the rust documentation is still a tad confusing, so while my search as shown up nothing, I feel like there is a good chance someone else may have found it.
The example can be written as:
The relevant documentation can be found here: https://doc.rust-lang.org/std/vec/struct.Vec.html