We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In rand_distr we switched all constructors to return a Result unless they couldn't fail to avoid having to panic.
rand_distr
Result
There is one distribution that didn't get updated: Bernoulli, which remains in Rand proper.
Bernoulli
Should we make this return a result? For:
Against:
Rng::gen_bool
I think probably we should, but would like to hear opinions?
The text was updated successfully, but these errors were encountered:
We could also add a new, non-panicking constructor and deprecate the old one.
(I think I would prefer a breaking change to rand though. I don't expect there is so much code using Bernoulli directly.)
rand
Sorry, something went wrong.
Make Bernoulli::new return a Result
Bernoulli::new
c6bce2c
Fixes rust-random#799.
Successfully merging a pull request may close this issue.
In
rand_distr
we switched all constructors to return aResult
unless they couldn't fail to avoid having to panic.There is one distribution that didn't get updated:
Bernoulli
, which remains in Rand proper.Should we make this return a result? For:
Against:
Rng::gen_bool
for convenience)I think probably we should, but would like to hear opinions?
The text was updated successfully, but these errors were encountered: