Skip to content

Fix combinations(0) and combinations_with_replacement(0).#383

Merged
bors[bot] merged 1 commit into
rust-itertools:masterfrom
andersk:empty-combinations
Jan 14, 2020
Merged

Fix combinations(0) and combinations_with_replacement(0).#383
bors[bot] merged 1 commit into
rust-itertools:masterfrom
andersk:empty-combinations

Conversation

@andersk
Copy link
Copy Markdown
Contributor

@andersk andersk commented Nov 12, 2019

The empty combination is always a valid combination of length 0.

Fixes #361 while also simplifying the code.

The empty combination is always a valid combination of length 0.

Fixes rust-itertools#361 while also simplifying the code.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@jswrenn
Copy link
Copy Markdown
Member

jswrenn commented Dec 3, 2019

Thanks for the contribution! combinations has been around long enough that users might be relying on this behavior. As such, I'm going to treat this like a breaking change, rather than a mere bug-fix, and postpone merging this until the next major version release.

@jswrenn
Copy link
Copy Markdown
Member

jswrenn commented Jan 14, 2020

Thanks!

bors r+

@jswrenn jswrenn added this to the next milestone Jan 14, 2020
bors Bot added a commit that referenced this pull request Jan 14, 2020
383: Fix combinations(0) and combinations_with_replacement(0). r=jswrenn a=andersk

The empty combination is always a valid combination of length 0.

Fixes #361 while also simplifying the code.

Co-authored-by: Anders Kaseorg <andersk@mit.edu>
@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jan 14, 2020

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combination on zero-sized array

2 participants