mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 10:30:41 +08:00
Fix clippy warning in release mode
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user