Skip to content

Conversation

@Philippe-Cholet
Copy link
Member

Fixes #904.
About the case k=0, I wonder if all our iterators behave well on iterators with side-effects. I think we should update the specialization tests.

The iterator can have side effects so I think it should be consumed in all cases, even k=0. If there are no side-effect then maybe the compiler will optimize it away.
Like with `tail(1)`, I think we should leverage a possible faster specialization.
@codecov
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.29%. Comparing base (6814180) to head (80c2b30).
Report is 42 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@ ## master #909 +/- ## ========================================== - Coverage 94.38% 94.29% -0.10%  ========================================== Files 48 48 Lines 6665 6815 +150 ========================================== + Hits 6291 6426 +135  - Misses 374 389 +15 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@phimuemue phimuemue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems consistent with tail

@Philippe-Cholet Philippe-Cholet added this to the next milestone Apr 4, 2024
@Philippe-Cholet Philippe-Cholet added this pull request to the merge queue Apr 4, 2024
Merged via the queue into rust-itertools:master with commit 1ef5453 Apr 4, 2024
@Philippe-Cholet Philippe-Cholet deleted the issue-904 branch April 4, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants