rust-itertools / itertools

Extra iterator adaptors, iterator methods, free functions, and macros.
https://docs.rs/itertools/
Apache License 2.0
2.62k stars 298 forks source link

Implement `DoubleEndedIterator` for `FilterOk` #947

Closed Xenira closed 1 month ago

Xenira commented 1 month ago

Should be doable with rfind unless there is a reason I overlooked.

Would be willing to implement this.

Philippe-Cholet commented 1 month ago

FlattenOk, MapSpecialCase (for MapOk, MapInto) are double ended and ProcessResults since a few weeks. FilterOk and FilterMapOk are not (yet) but it seems reasonable to me.

Specialization tests and benchmarks will need to be updated but that's simple to do.

Xenira commented 1 month ago

Like that? Have to admit, not entirely comprehending the test system yet.

Also not sure, if rfold needs custom impl. FlattenOk didn't have any. Edit: nvm, found it. So prob. yes.

Philippe-Cholet commented 1 month ago

@Xenira I did not notice before they were not double ended so thanks for this.