Skip to content

Fix stablePartition(subrange:by:) using subrange count instead of entire collection count. #30

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

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

pmtao
Copy link
Contributor

@pmtao pmtao commented Oct 20, 2020

Function stablePartition(subrange:by:) in Partition should not using the collection count which will cause bound error, but using subrange count.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@kylemacomber
Copy link

Good catch!

@natecook1000
Copy link
Member

Thanks for this fix, @pmtao! 👏👏👏

@natecook1000 natecook1000 merged commit 0dba0e5 into apple:main Oct 20, 2020
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.

3 participants