-
-
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
impl std::error::Error for rand_distr::*Error. #919
impl std::error::Error for rand_distr::*Error. #919
Conversation
Requires feature gates for std. I wrote posted some thought about an error trait without alloc btw: |
@burdges
Until we get non-std-support of these math functions there's no point to feature gate |
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.
Could you add a note to the changelog please? https://rust-random.github.io/book/contributing.html#pull-requests
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; mostly this looks good but perhaps a couple of doc strings should be tweaked.
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.
Looks good.
Sorry to add yet another thing to this PR, but I just realised we don't catch the Bernoulli::new(NaN)
case. I don't think this is classified as a breaking change, but is worth a mention in the changelog. Can I get you to add it to this PR? Thanks.
That also applies to |
Also re-exported
BernoulliError
intorand_distr
.