Skip to content
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

Update to rand 0.5 #48

Merged
merged 9 commits into from
May 23, 2018
Merged

Update to rand 0.5 #48

merged 9 commits into from
May 23, 2018

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented May 22, 2018

This closes #47, choosing to only support rand 0.5 (and only for their supported rustc 1.22+).

The RandBigInt trait still exists as an extension to all Rng types. It's no longer defined at all when the "rand" feature is not enabled. That was a misbehavior before, as enabling "rand" adds a blanket implementation, which would be a breaking change just by toggling the feature.

BigUint and BigInt now implement SampleUniform too, which lets them work natively with Rng::gen_range, Rng::sample, and Uniform in general.

@cuviper
Copy link
Member Author

cuviper commented May 23, 2018

bors r+

bors bot added a commit that referenced this pull request May 23, 2018
48: Update to rand 0.5 r=cuviper a=cuviper

This closes #47, choosing to *only* support rand 0.5 (and only for their supported rustc 1.22+).

The `RandBigInt` trait still exists as an extension to all `Rng` types.  It's no longer defined at all when the "rand" feature is not enabled.  That was a misbehavior before, as enabling "rand" adds a blanket implementation, which would be a breaking change just by toggling the feature.

`BigUint` and `BigInt` now implement `SampleUniform` too, which lets them work natively with `Rng::gen_range`, `Rng::sample`, and `Uniform` in general.

Co-authored-by: Josh Stone <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 23, 2018

Build succeeded

@bors bors bot merged commit b252cce into rust-num:master May 23, 2018
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.

Consider support for rand 0.5
1 participant