#How can I use a mutable reference mutably after using .iter()?
9 messages · Page 1 of 1 (latest)
I'm getting a message that I can't use self as mutable again
"Immutable borrows occurs here" is pointing to the iter call
cannot borrow `self.descriptors` as mutable because it is also borrowed as immutable
Looks like you want https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain
A contiguous growable array type, written as Vec, short for ‘vector’.
Though remember to invert the condition, because the condition should be true for items you want to keep