Skip to content

Allow fn choose_multiple_weighted to return fewer than amount elts - #1623

Merged
dhardy merged 4 commits into
masterfrom
push-rzyotswpvxpx
Apr 9, 2025
Merged

dhardy merged 4 commits into
masterfrom
push-rzyotswpvxpx

Conversation

@dhardy

@dhardy dhardy commented Apr 9, 2025

Copy link
Copy Markdown
Member
  • 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

@benjamin-lieser benjamin-lieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good

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