-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Description
I was bit surprised by that Itertools::tuple_windows
is not somewhat lazy and has side effect.
It is consuming the first tuple when calling Itertools::tuple_windows
.
https://doc.rust-lang.org/nightly/core/iter/index.html#laziness says that adapters in Iterator
is lazy and
the TupleWindows
has #[must_use = "iterator adaptors are lazy and do nothing unless consumed]
since #227
So the question is
- Is this intended behavior?
- Should (all) adapters in
Itertools
be lazy? - Should the laziness be documented?
Metadata
Metadata
Assignees
Labels
No labels