Hi.
I know this is related to the re-configurations to do with the OS random changes, the following code:
Xoshiro512PlusPlus::from_os_rng(),
Was the way to do things, and I have no idea what the new method to achieve this is since the update guide for rand 0.10 isn't done yet: https://rust-random.github.io/book/update-0.9.html
Can anyone tell me what the equivalent is? I've tried picking through the change logs and I can't make any sense of what's been done and why. These things break spectacularly every few versions.
The only way I can figure out to do this presently as is as follows... but it is fugly and looks like something my dog ate and vomited back up:
let mut os_seed <Xoshiro512PlusPlus as SeedableRng>::Seed = Default::default(); OsRng.try_fill_bytes(os_seed.as_mut()).unwrap();
And then just seeding that the normal way. If that's the only way, it is what it is, but that just looks gross.
It's not just this either, it's broken fill, shuffle... and I could go on and on.
Hi.
I know this is related to the re-configurations to do with the OS random changes, the following code:
Xoshiro512PlusPlus::from_os_rng(),Was the way to do things, and I have no idea what the new method to achieve this is since the update guide for rand 0.10 isn't done yet: https://rust-random.github.io/book/update-0.9.html
Can anyone tell me what the equivalent is? I've tried picking through the change logs and I can't make any sense of what's been done and why. These things break spectacularly every few versions.
The only way I can figure out to do this presently as is as follows... but it is fugly and looks like something my dog ate and vomited back up:
let mut os_seed <Xoshiro512PlusPlus as SeedableRng>::Seed = Default::default(); OsRng.try_fill_bytes(os_seed.as_mut()).unwrap();And then just seeding that the normal way. If that's the only way, it is what it is, but that just looks gross.
It's not just this either, it's broken fill, shuffle... and I could go on and on.