Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ExactSizeIterator for Tuples #761

Merged
merged 6 commits into from Sep 27, 2023

Conversation

Philippe-Cholet
Copy link
Member

@Philippe-Cholet Philippe-Cholet commented Sep 27, 2023

I was hunting missing size_hint specializations for a few weeks now and from my notes, Tuples is apparently the penultimate one.
(TupleCombinations should be the last one.)

Only when `I` is exact itself.
Note that in this case, `add_then_div` won't ever return `None` since what is in the buffer was previously in `iter` so `n+a` is less or equal to the iterator length.
src/tuple_impl.rs Outdated Show resolved Hide resolved
Co-authored-by: Jack Wrenn <me@jswrenn.com>
@jswrenn jswrenn added this to the next milestone Sep 27, 2023
@jswrenn jswrenn added this pull request to the merge queue Sep 27, 2023
Merged via the queue into rust-itertools:master with commit c70f805 Sep 27, 2023
8 checks passed
@Philippe-Cholet Philippe-Cholet deleted the tuples-size-hint branch September 27, 2023 15:36
@jswrenn jswrenn mentioned this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants