Open jonathan-conder opened 8 months ago
It seems like filter_map stops after the first None.
None
For example:
use ::lending_iterator::prelude::*; fn main() { let array = [0, 1, 2, 3, 4, 5, 6]; for m in array.iter().filter_map(|n| (n % 2 == 0).then_some(n)) { print!("{m} "); } println!(); let iter = lending_iterator::from_iter(array.iter()); let mut filtered = iter.filter_map_to_ref(|[], n| (n % 2 == 0).then_some(n)); while let Some(m) = filtered.next() { print!("{m} "); } println!(); }
This prints:
0 2 4 6 0
I'm using version 0.1.7.
0.1.7
It seems like filter_map stops after the first
None
.For example:
This prints:
I'm using version
0.1.7
.