Remove Item
Create a vector with "apple", "banana", and "cherry". Remove "banana" from the vector, then print the remaining items, one per line.
Expected output:
text
apple cherry
Hints:
- Use
.retain()to keep only the items you want .retain(|&x| x != "banana")keeps everything that is NOT "banana"- Don't forget
mutsince you're changing the vector!
rust
fn main() {
}