We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c508d3 commit 0812927Copy full SHA for 0812927
src/lib.rs
@@ -892,13 +892,9 @@ impl<'a> SeedableRng<&'a [usize]> for StdRng {
892
/// seeded `Rng` for consistency over time you should pick one algorithm and
893
/// create the `Rng` yourself.
894
///
895
-/// This will read randomness from the operating system to seed the
896
-/// generator.
+/// This will seed the generator with randomness from thread_rng.
897
pub fn weak_rng() -> XorShiftRng {
898
- match OsRng::new() {
899
- Ok(mut r) => r.gen(),
900
- Err(e) => panic!("weak_rng: failed to create seeded RNG: {:?}", e)
901
- }
+ thread_rng().gen()
902
}
903
904
/// Controls how the thread-local RNG is reseeded.
0 commit comments