Skip to content

Commit cf4a2b7

Browse files
imartayanRagnarGrootKoerkamp
authored andcommitted
Use smallrng instead of rand_xoshiro
1 parent 9fc7ab1 commit cf4a2b7

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

Diff for: Cargo.lock

-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ description = "Constructing and iterating packed DNA sequences using SIMD"
1111

1212
[dependencies]
1313
wide = "0.7.32"
14-
rand = "0.9.0"
15-
rand_xoshiro = "0.7.0"
14+
rand = { version = "0.9", features = ["small_rng"] }
1615
mem_dbg = "0.2.4"
1716
cfg-if = "1.0.0"
1817

Diff for: src/ascii.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl SeqVec for Vec<u8> {
275275

276276
fn random(n: usize) -> Self {
277277
let mut seq = vec![0; n];
278-
rand_xoshiro::Xoshiro512StarStar::from_os_rng().fill_bytes(&mut seq);
278+
rand::rngs::SmallRng::from_os_rng().fill_bytes(&mut seq);
279279
seq
280280
}
281281
}

Diff for: src/ascii_seq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl SeqVec for AsciiSeqVec {
383383

384384
fn random(n: usize) -> Self {
385385
let mut seq = vec![0; n];
386-
rand_xoshiro::Xoshiro512StarStar::from_os_rng().fill_bytes(&mut seq);
386+
rand::rngs::SmallRng::from_os_rng().fill_bytes(&mut seq);
387387
Self {
388388
seq: seq.into_iter().map(|b| b"ACGT"[b as usize % 4]).collect(),
389389
}

Diff for: src/packed_seq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ impl SeqVec for PackedSeqVec {
561561

562562
fn random(n: usize) -> Self {
563563
let mut seq = vec![0; n.div_ceil(4)];
564-
rand_xoshiro::Xoshiro512StarStar::from_os_rng().fill_bytes(&mut seq);
564+
rand::rngs::SmallRng::from_os_rng().fill_bytes(&mut seq);
565565
PackedSeqVec { seq, len: n }
566566
}
567567
}

0 commit comments

Comments
 (0)