diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-09-13 10:42:33 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-09-23 17:04:21 +0200 |
| commit | 62ad2f97db762d5f750d64ffed8fcca2c57a8be9 (patch) | |
| tree | 25911a1ee02fc060a6fff4b41ea9fe0b8a785759 | |
| parent | 185f590851a64888e368de2b01341f74cc3f5c23 (diff) | |
| download | mullvadvpn-62ad2f97db762d5f750d64ffed8fcca2c57a8be9.tar.xz mullvadvpn-62ad2f97db762d5f750d64ffed8fcca2c57a8be9.zip | |
Upgrade `rand` to `0.9` in `talpid-future`
| -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 { |
