Skip to content

Allow fn choose_multiple_weighted to return fewer than amount elts #1623

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 4 commits into from
Apr 9, 2025

Conversation

dhardy
Copy link
Member

@dhardy dhardy commented Apr 9, 2025

  • Added a CHANGELOG.md entry

Summary

Allow fn rand::seq::index::sample_weighted and fn IndexedRandom::choose_multiple_weighted to return fewer than amount results.

Details

This restriction was added in #1382 without being mentioned in the changelog, and it appears best to revert this behaviour (#1619).

dhardy added 3 commits April 9, 2025 09:34
@dhardy dhardy requested a review from benjamin-lieser April 9, 2025 09:06
Copy link
Member

@benjamin-lieser benjamin-lieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@dhardy dhardy merged commit 5f5b580 into master Apr 9, 2025
15 checks passed
@dhardy dhardy deleted the push-rzyotswpvxpx branch April 9, 2025 14:54
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.

2 participants