Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
a-rustacean committed Jan 29, 2025
1 parent b845269 commit 0310192
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use chrono::prelude::*;
#[cfg(target_arch = "wasm32")]
use js_sys::Math;
#[cfg(not(target_arch = "wasm32"))]
use rand::{thread_rng, Rng};
use rand::{rng, Rng};
use serde::{Deserialize, Deserializer};

const API_URL: &str = "https://www.1secmail.com/api/v1/";
Expand Down Expand Up @@ -255,8 +255,8 @@ where

#[cfg(not(target_arch = "wasm32"))]
fn random() -> f64 {
let mut rng = thread_rng();
rng.gen_range(0.0..1.0)
let mut rng = rng();
rng.random_range(0.0..1.0)
}

#[cfg(target_arch = "wasm32")]
Expand Down

0 comments on commit 0310192

Please sign in to comment.