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

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

Merged
merged 1 commit into from Jan 14, 2020

Conversation

andersk
Copy link
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
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
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
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