Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed May 23, 2024
1 parent 8ce3364 commit a9db57b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rand_distr/tests/pdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#![allow(clippy::float_cmp)]

use average::Histogram;
use rand::Rng;
use rand::{Rng, SeedableRng};
use rand_distr::{Normal, SkewNormal};

const HIST_LEN: usize = 100;
Expand Down
2 changes: 1 addition & 1 deletion src/rngs/small.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl SeedableRng for SmallRng {
#[inline(always)]
fn from_seed(seed: Self::Seed) -> Self {
// With MSRV >= 1.77: let seed = *seed.first_chunk().unwrap();
const LEN: usize = std::mem::size_of::<<Rng as SeedableRng>::Seed>();
const LEN: usize = core::mem::size_of::<<Rng as SeedableRng>::Seed>();
let seed = (&seed[..LEN]).try_into().unwrap();
SmallRng(Rng::from_seed(seed))
}
Expand Down

0 comments on commit a9db57b

Please sign in to comment.