-
-
Notifications
You must be signed in to change notification settings - Fork 34
Use rand_core 0.10.0-rc-2 #71
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
Conversation
rand_jitter/src/lib.rs
Outdated
| use rand_core::{ | ||
| le::{self}, | ||
| RngCore, | ||
| }; |
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.
This can be reformatted (delete ::{self}).
rand_hc/src/hc128.rs
Outdated
| #[inline] | ||
| fn from_rng(rng: &mut impl RngCore) -> Self { | ||
| fn from_rng<R>(rng: &mut R) -> Self | ||
| where | ||
| R: RngCore + ?Sized, | ||
| { | ||
| Hc128Rng(BlockRng::<Hc128Core>::from_rng(rng)) | ||
| } | ||
|
|
||
| #[inline] | ||
| fn try_from_rng<R: TryRngCore>(rng: &mut R) -> Result<Self, R::Error> { | ||
| fn try_from_rng<R>(rng: &mut R) -> Result<Self, R::Error> | ||
| where | ||
| R: TryRngCore + ?Sized, | ||
| { | ||
| BlockRng::<Hc128Core>::try_from_rng(rng).map(Hc128Rng) | ||
| } |
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.
The {try_}from_rng implementations can be deleted.
Addresses rust-random#71 (comment).
|
PR updated! |
dhardy
left a comment
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.
You can also delete the from_rng one-line implementations.
|
Also looks like the Isaac RNGs do need those try_from_rng / from_rng methods. |
Addresses rust-random#71 (comment)
PR updated. Thanks for the patience. I'm not sure if #[test]
fn test_isaac_construction() {
let seed = [
1, 0, 0, 0, 23, 0, 0, 0, 200, 1, 0, 0, 210, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
];
let mut rng1 = IsaacRng::from_seed(seed);
assert_eq!(rng1.next_u32(), 2869442790);
// do we need this?
let mut rng2 = IsaacRng::from_rng(&mut rng1);
assert_eq!(rng2.next_u32(), 3094074039);
} |
|
See the impl of |
|
The benchmarks are harder to update since |
|
Perhaps the benchmarks could initialize from a static seed rather than |
|
It also looks like the MSRV needs to be bumped from 1.63 to 1.85 |
|
I updated the MSRV in #73. |
|
@allan2 can you rebase/merge to pick up the MSRV change? |
Addresses rust-random#71 (comment).
This reverts commit 01ec28a.
Done |
rand_hc/src/hc128.rs
Outdated
| <<<<<<< HEAD | ||
| <<<<<<< HEAD | ||
| <<<<<<< HEAD |
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 like some merge conflicts
|
Looks like it's just the benchmarks that need updated now. Can the (this PR is blocking updating one of my dependencies, so I'm very excited to see it land) |
|
Yes, it's just benchmarks. I can fix those in a new PR. |
dhardy
left a comment
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 @allan2
|
@dhardy would you mind cutting some prereleases of these? I specifically need |
This bumps
rand_coreto 0.10.0-rc-2 (2025-10-31).clippyandfmtare clean.