How to combine filter_map
and flat_map
?
I'd like to collect impl Iterator<Item = Result<impl Iterator<Item = T>, Error>>
to Result<Vec<T>, Error>
.
How to combine filter_map
and flat_map
?
I'd like to collect impl Iterator<Item = Result<impl Iterator<Item = T>, Error>>
to Result<Vec<T>, Error>
.
Ok, I found itertools::flatten_ok
can work...