File tree 1 file changed +17
-0
lines changed 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1139,6 +1139,23 @@ impl SeedableRng for SmallRng {
1139
1139
}
1140
1140
}
1141
1141
1142
+ /// DEPRECATED: use `SmallRng` instead.
1143
+ ///
1144
+ /// Create a weak random number generator with a default algorithm and seed.
1145
+ ///
1146
+ /// It returns the fastest `Rng` algorithm currently available in Rust without
1147
+ /// consideration for cryptography or security. If you require a specifically
1148
+ /// seeded `Rng` for consistency over time you should pick one algorithm and
1149
+ /// create the `Rng` yourself.
1150
+ ///
1151
+ /// This will seed the generator with randomness from thread_rng.
1152
+ #[ deprecated( since="0.5.0" , note="removed in favor of SmallRng" ) ]
1153
+ #[ cfg( feature="std" ) ]
1154
+ pub fn weak_rng ( ) -> XorShiftRng {
1155
+ XorShiftRng :: from_rng ( & mut thread_rng ( ) ) . unwrap_or_else ( |err|
1156
+ panic ! ( "weak_rng failed: {:?}" , err) )
1157
+ }
1158
+
1142
1159
/// DEPRECATED: use `seq::sample_iter` instead.
1143
1160
///
1144
1161
/// Randomly sample up to `amount` elements from a finite iterator.
You can’t perform that action at this time.
0 commit comments