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 simplification: do not process the ArrayChunks remainder in fold() 2022-11-07 21:44:25 +01:00
by_ref_sized.rs Properly forward ByRefSized::fold to the inner iterator 2022-08-14 22:55:30 -07:00
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 library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
filter.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flat_map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
flatten.rs replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
fuse.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
inspect.rs
intersperse.rs eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
map_windows.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
map.rs library/core/tests/iter rearrange & add back missed doc comments 2021-01-22 17:57:07 -05:00
mod.rs Add Iterator::map_windows 2023-08-11 07:26:51 +08:00
peekable.rs eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
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 disable test on platforms that don't support unwinding 2021-06-20 12:20:05 +02:00