diff options
| -rw-r--r-- | Cargo.lock | 2 | ||||
| -rw-r--r-- | talpid-future/Cargo.toml | 2 | ||||
| -rw-r--r-- | talpid-future/src/retry.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock index 5e5ab7bbe7..299cb5b596 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5645,7 +5645,7 @@ name = "talpid-future" version = "0.0.0" dependencies = [ "proptest", - "rand 0.8.5", + "rand 0.9.2", "talpid-time", "tokio", ] diff --git a/talpid-future/Cargo.toml b/talpid-future/Cargo.toml index 9baa0245d1..502c210a64 100644 --- a/talpid-future/Cargo.toml +++ b/talpid-future/Cargo.toml @@ -11,7 +11,7 @@ rust-version.workspace = true workspace = true [dependencies] -rand = "0.8.5" +rand = { workspace = true } talpid-time = { path = "../talpid-time" } [dev-dependencies] diff --git a/talpid-future/src/retry.rs b/talpid-future/src/retry.rs index def46d5bc2..6bc68174d6 100644 --- a/talpid-future/src/retry.rs +++ b/talpid-future/src/retry.rs @@ -1,5 +1,5 @@ //! This library provides utility functions and types for retrying futures. -use rand::{Rng, distributions::OpenClosed01}; +use rand::{Rng, distr::OpenClosed01}; use std::{future::Future, ops::Deref, time::Duration}; use talpid_time::sleep; @@ -143,7 +143,7 @@ impl<I> Deref for Jittered<I> { /// Apply a jitter to a duration. fn jitter(dur: Duration) -> Duration { - apply_jitter(dur, rand::thread_rng().sample(OpenClosed01)) + apply_jitter(dur, rand::rng().sample(OpenClosed01)) } fn apply_jitter(duration: Duration, jitter: f64) -> Duration { |
