Fix clippy warning in release mode

This commit is contained in:
Alexis Sellier 2023-03-02 14:07:48 +01:00
parent de71c5d9b1
commit 9d244b221a
No known key found for this signature in database
1 changed files with 1 additions and 2 deletions

View File

@ -367,14 +367,13 @@ pub mod encoding {
}
pub mod rng {
use crate::env;
use rand::{rngs::StdRng, SeedableRng};
/// Get the "standard" CSPRNG, seeded from OS entropy.
/// The seed can be overwritten in debug mode with the `RAD_SEED` environment variable.
pub fn std() -> StdRng {
#[cfg(debug_assertions)]
if let Some(seed) = env::seed() {
if let Some(seed) = crate::env::seed() {
return StdRng::from_seed(seed);
}
StdRng::from_entropy()