Skip to content

Commit 0e094a9

Browse files
committed
rand_xoshiro: Apply rustfmt
1 parent 2a8757c commit 0e094a9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

rand_xoshiro/src/common.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ macro_rules! impl_state_pair {
238238
/// [`SeedableRng::from_seed`]: rand_core::SeedableRng::from_seed
239239
pub fn state(&self) -> [u8; 2 * core::mem::size_of::<$word>()] {
240240
const N: usize = core::mem::size_of::<$word>();
241-
const { assert!(core::mem::size_of::<Self>() == 2 * N); }
241+
const {
242+
assert!(core::mem::size_of::<Self>() == 2 * N);
243+
}
242244
let mut out = [0u8; 2 * N];
243245
out[..N].copy_from_slice(&self.s0.to_le_bytes());
244246
out[N..].copy_from_slice(&self.s1.to_le_bytes());
@@ -264,7 +266,9 @@ macro_rules! impl_state_array_of_four {
264266
/// [`SeedableRng::from_seed`]: rand_core::SeedableRng::from_seed
265267
pub fn state(&self) -> [u8; 4 * core::mem::size_of::<$word>()] {
266268
const N: usize = core::mem::size_of::<$word>();
267-
const { assert!(core::mem::size_of::<Self>() == 4 * N); }
269+
const {
270+
assert!(core::mem::size_of::<Self>() == 4 * N);
271+
}
268272
let mut out = [0u8; 4 * N];
269273
out[..N].copy_from_slice(&self.s[0].to_le_bytes());
270274
out[N..2 * N].copy_from_slice(&self.s[1].to_le_bytes());

0 commit comments

Comments
 (0)