-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Consider adding Rng::choose
#1166
Comments
I have found out about |
However, we could add |
We could add We could implement Hence, I'd prefer to solve this with only documentation; the Getting Started guide should likely mention this. |
I decided not to add |
It seems that the current way to sample from a slice is
s[rng.gen_range(0..s.len())]
. This is not as nice asrng.sample(s)
would be, but for some reason Distribution is not implemented for&[T]
?The text was updated successfully, but these errors were encountered: