rust-itertools / itertools

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

Test the laziness of our iterators #792

Closed Philippe-Cholet closed 8 months ago

Philippe-Cholet commented 11 months ago

Related to #791 Add a test to:

It's a long list of iterators and it has some edge cases. The error message help us understand how unlazy there are.

When let _ = ...; is not necessary, it indicates that a must_use attribute is missing.

CI will fail for some time.

Philippe-Cholet commented 11 months ago

I surely had doubts about my big test. Thanks for your review. I rewrote it.

Panicking: The ExactSizeIterator implementation is needed for circular_tuple_windows (the actual length does not matter). No DoubleEndedIterator implementation needed.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b1be1e4) 94.40% compared to head (fee3f6d) 94.29%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #792 +/- ## ========================================== - Coverage 94.40% 94.29% -0.11% ========================================== Files 48 48 Lines 6665 6665 ========================================== - Hits 6292 6285 -7 - Misses 373 380 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Philippe-Cholet commented 8 months ago

I'm not sure what to do about the remaining unlazy iterators yet. I therefore added one commit to ignore the 3 failing laziness tests (then rebased). I think we should merge this and un-ignore failing tests later.