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

Make Product lazy #800

Merged
merged 3 commits into from
Nov 13, 2023
Merged

Conversation

Philippe-Cholet
Copy link
Member

Related to #792.
To make the Product adaptor lazy, I use a nested option, just like I did in #797.
Then the method cartesian_product and the macro iproduct will be lazy.

Similar to what is done by `core::iter::Peekable`, a nested option is now used.
`b` size hint was computed even when not needed.
@Philippe-Cholet Philippe-Cholet mentioned this pull request Nov 13, 2023
11 tasks
src/adaptors/mod.rs Outdated Show resolved Hide resolved
@jswrenn jswrenn added this pull request to the merge queue Nov 13, 2023
Merged via the queue into rust-itertools:master with commit 6d29178 Nov 13, 2023
8 checks passed
@Philippe-Cholet Philippe-Cholet deleted the product-laziness branch November 13, 2023 20:47
@jswrenn jswrenn mentioned this pull request Nov 14, 2023
@jswrenn jswrenn added this to the next milestone 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