File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ impl CryptoRng for ChaChaRng {}
170
170
171
171
172
172
#[ derive( Clone , Debug ) ]
173
- #[ deprecated( since="0.6.0" , note="import with rand::prng::XorShiftRng instead" ) ]
174
- pub struct XorShiftRng ( prng :: XorShiftRng ) ;
173
+ #[ deprecated( since="0.6.0" , note="import from rand_xorshift crate instead" ) ]
174
+ pub struct XorShiftRng ( :: rand_xorshift :: XorShiftRng ) ;
175
175
176
176
impl RngCore for XorShiftRng {
177
177
#[ inline( always) ]
@@ -196,14 +196,14 @@ impl RngCore for XorShiftRng {
196
196
}
197
197
198
198
impl SeedableRng for XorShiftRng {
199
- type Seed = <prng :: XorShiftRng as SeedableRng >:: Seed ;
199
+ type Seed = <:: rand_xorshift :: XorShiftRng as SeedableRng >:: Seed ;
200
200
201
201
fn from_seed ( seed : Self :: Seed ) -> Self {
202
- XorShiftRng ( prng :: XorShiftRng :: from_seed ( seed) )
202
+ XorShiftRng ( :: rand_xorshift :: XorShiftRng :: from_seed ( seed) )
203
203
}
204
204
205
205
fn from_rng < R : RngCore > ( rng : R ) -> Result < Self , Error > {
206
- prng :: XorShiftRng :: from_rng ( rng) . map ( XorShiftRng )
206
+ :: rand_xorshift :: XorShiftRng :: from_rng ( rng) . map ( XorShiftRng )
207
207
}
208
208
}
209
209
Original file line number Diff line number Diff line change @@ -321,9 +321,10 @@ pub mod hc128;
321
321
322
322
pub use self :: chacha:: ChaChaRng ;
323
323
pub use self :: hc128:: Hc128Rng ;
324
- pub use :: rand_xorshift:: XorShiftRng ;
325
324
326
325
// Deprecations (to be removed in 0.7)
326
+ #[ doc( hidden) ] #[ allow( deprecated) ]
327
+ pub use deprecated:: XorShiftRng ;
327
328
#[ doc( hidden) ] pub mod isaac {
328
329
// Note: we miss `IsaacCore` here but probably unimportant.
329
330
#[ allow( deprecated) ] pub use deprecated:: IsaacRng ;
Original file line number Diff line number Diff line change 11
11
//! A small fast RNG
12
12
13
13
use { RngCore , SeedableRng , Error } ;
14
- use prng :: XorShiftRng ;
14
+ use :: rand_xorshift :: XorShiftRng ;
15
15
16
16
/// An RNG recommended when small state, cheap initialization and good
17
17
/// performance are required. The PRNG algorithm in `SmallRng` is chosen to be
Original file line number Diff line number Diff line change @@ -598,7 +598,7 @@ fn sample_indices_cache<R>(
598
598
mod test {
599
599
use super :: * ;
600
600
#[ cfg( feature = "alloc" ) ] use { Rng , SeedableRng } ;
601
- #[ cfg( feature = "alloc" ) ] use prng :: XorShiftRng ;
601
+ #[ cfg( feature = "alloc" ) ] use :: rand_xorshift :: XorShiftRng ;
602
602
#[ cfg( all( feature="alloc" , not( feature="std" ) ) ) ]
603
603
use alloc:: vec:: Vec ;
604
604
You can’t perform that action at this time.
0 commit comments