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 93ee2fd commit 5489851Copy full SHA for 5489851
rand_core/src/lib.rs
@@ -41,7 +41,6 @@
41
42
use core::convert::AsMut;
43
use core::default::Default;
44
-use core::ptr::copy_nonoverlapping;
45
46
#[cfg(all(feature = "alloc", not(feature = "std")))] extern crate alloc;
47
#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::boxed::Box;
@@ -313,8 +312,8 @@ pub trait SeedableRng: Sized {
313
312
// Use PCG output function with to_le to generate x:
314
let xorshifted = (((state >> 18) ^ state) >> 27) as u32;
315
let rot = (state >> 59) as u32;
316
- let x = xorshifted.rotate_right(rot).to_le();
317
- chunk.copy_from_slice(&x.to_ne_bytes());
+ let x = xorshifted.rotate_right(rot);
+ chunk.copy_from_slice(&x.to_le_bytes());
318
}
319
320
Self::from_seed(seed)
0 commit comments