Fix clippy warning in release mode
This commit is contained in:
parent
de71c5d9b1
commit
9d244b221a
|
|
@ -367,14 +367,13 @@ pub mod encoding {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod rng {
|
pub mod rng {
|
||||||
use crate::env;
|
|
||||||
use rand::{rngs::StdRng, SeedableRng};
|
use rand::{rngs::StdRng, SeedableRng};
|
||||||
|
|
||||||
/// Get the "standard" CSPRNG, seeded from OS entropy.
|
/// Get the "standard" CSPRNG, seeded from OS entropy.
|
||||||
/// The seed can be overwritten in debug mode with the `RAD_SEED` environment variable.
|
/// The seed can be overwritten in debug mode with the `RAD_SEED` environment variable.
|
||||||
pub fn std() -> StdRng {
|
pub fn std() -> StdRng {
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
if let Some(seed) = env::seed() {
|
if let Some(seed) = crate::env::seed() {
|
||||||
return StdRng::from_seed(seed);
|
return StdRng::from_seed(seed);
|
||||||
}
|
}
|
||||||
StdRng::from_entropy()
|
StdRng::from_entropy()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue