I have a vector of Options and I want to filter only the Somes. I use filter_map with identity:
let v = vec![Some(1), None, Some(2)];
for i in v.into_iter().filter_map(|o| o) {
println!("{}", i);
}
Is there a builtin function permitting to write something like filter_map(identity)?