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
Initial implementation of Slice distribution #1107
Conversation
Looking through the |
It seems the newly added tests don't compile. |
Sorry about that, fixed |
- Replace Option<Self> with Result<Self, EmptySlice> - Add a debug_assert to the unsafe part of the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a note to the changelog.
@kazcw Well spotted, thanks! |
This PR implements a new
Slice
distribution which uniformly samples items from a slice.Fixes #1105