Replace all filter_map with flat_map
It works because:
filter_maptakes aFnMut(Self::Item) -> Option<B>flat_maptakes aFnMut(Self::Item) -> impl IntoIteratorOptionimplementsIntoIteratorOptionimplementsIntoIterator, which will return an iterator with one item forSomeand empty iterator forNone