rust/library/core/tests/iter/adapters
Frank King 97c953f561 Add Iterator::map_windows
This is inherited from the old PR.

This method returns an iterator over mapped windows of the starting
iterator. Adding the more straight-forward `Iterator::windows` is not
easily possible right now as the items are stored in the iterator type,
meaning the `next` call would return references to `self`. This is not
allowed by the current `Iterator` trait design. This might change once
GATs have landed.

The idea has been brought up by @m-ou-se here:
https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Iterator.3A.3A.7Bpairwise.2C.20windows.7D/near/224587771

Co-authored-by: Lukas Kalbertodt <lukas.kalbertodt@gmail.com>
2023-08-11 07:26:51 +08:00
..
array_chunks.rs
by_ref_sized.rs
chain.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
cloned.rs
copied.rs
cycle.rs
enumerate.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
filter_map.rs
filter.rs
flat_map.rs
flatten.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
fuse.rs
inspect.rs
intersperse.rs
map_windows.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
map.rs
mod.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
peekable.rs
scan.rs
skip_while.rs
skip.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
step_by.rs Specialize StepBy<Range<{integer}>> 2023-06-23 00:17:34 +02:00
take_while.rs
take.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
zip.rs