Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ exclude = ["benches", "distr_test"]
rand_core = { version = "0.10.0-rc-6", default-features = false }
log = { version = "0.4.4", optional = true }
serde = { version = "1.0.103", features = ["derive"], optional = true }
chacha20 = { version = "0.10.0-rc.9", default-features = false, features = ["rng"], optional = true }
chacha20 = { version = "0.10.0-rc.10", default-features = false, features = ["rng"], optional = true }
getrandom = { version = "0.4.0-rc.1", optional = true }

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions benches/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ simd_support = ["rand/simd_support"]
[dev-dependencies]
rand = { path = "..", features = ["small_rng", "nightly"] }
rand_pcg = { path = "../rand_pcg" }
chacha20 = { version = "0.10.0-rc.7", default-features = false, features = ["rng"] }
chacha20 = { version = "0.10.0-rc.10", default-features = false, features = ["rng"] }
criterion = "0.5"
criterion-cycles-per-byte = "0.6"

Expand Down
3 changes: 0 additions & 3 deletions src/rngs/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
use core::convert::Infallible;
use rand_core::{SeedableRng, TryCryptoRng, TryRng};

#[cfg(any(test, feature = "sys_rng"))]
pub(crate) use chacha20::ChaCha12Core as Core;

use chacha20::ChaCha12Rng as Rng;

/// A strong, fast (amortized), non-portable RNG
Expand Down
2 changes: 1 addition & 1 deletion src/rngs/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::fmt;
use std::rc::Rc;
use std::thread_local;

use super::std::Core;
use super::{SysError, SysRng};
use rand_core::SeedableRng;
use rand_core::block::{BlockRng, Generator};
Expand All @@ -39,6 +38,7 @@ use rand_core::{TryCryptoRng, TryRng};
// of 32 kB and less. We choose 64 kB to avoid significant overhead.
const THREAD_RNG_RESEED_THRESHOLD: i64 = 1024 * 64;

type Core = chacha20::ChaChaCore<chacha20::R12, chacha20::variants::Legacy>;
type Results = <Core as Generator>::Output;

struct ReseedingCore {
Expand Down