rust-itertools / itertools

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

Add documentation for `multi_cartesian_product` when iterator is empty #834

Closed YizhePKU closed 7 months ago

YizhePKU commented 8 months ago

Document the correct behavior of nullary cartesian product.

The bug was submitted in 2019 and #603 fixes it just fine. Please just merge both this PR and PR #603 and call it a day. I understand that review time is scarce, but having automated tests pass should be good enough for this kind of change.

Philippe-Cholet commented 8 months ago

I detect a bit of impatience and I get it, I do and I'm gonna look into it.

The "check format" fails, probably just the trailing spaces. If you could remove them, and possibly squash into one commit, that would be nice.

EDIT: The old 603 is now rebased.

YizhePKU commented 7 months ago

The "check format" fails, probably just the trailing spaces. If you could remove them, and possibly squash into one commit, that would be nice.

Done.

codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (33541c4) 94.22% compared to head (7ab8480) 94.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #834 +/- ## ========================================== - Coverage 94.22% 94.18% -0.04% ========================================== Files 48 48 Lines 6670 6676 +6 ========================================== + Hits 6285 6288 +3 - Misses 385 388 +3 ```

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

Philippe-Cholet commented 7 months ago

835 has been merged a few minutes ago. It's now time for your PR.

I rebased to see it work. Then I changed "self" for "the adapted iterator" in your commit. Thanks for this.