Skip to content

Commit cde96ac

Browse files
authored
chore(grpc): Update to rand 0.9 (#2324)
1 parent 23d136e commit cde96ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ futures-core = "0.3.31"
1313
serde_json = "1.0.140"
1414
serde = "1.0.219"
1515
hickory-resolver = { version = "0.25.1", optional = true }
16-
rand = "0.8.5"
16+
rand = "0.9"
1717
parking_lot = "0.12.4"
1818
bytes = "1.10.1"
1919

grpc/src/client/name_resolution/backoff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl ExponentialBackoff {
100100
pub fn backoff_duration(&mut self) -> Duration {
101101
let next_delay = self.next_delay_secs;
102102
let cur_delay =
103-
next_delay * (1.0 + self.config.jitter * rand::thread_rng().gen_range(-1.0..1.0));
103+
next_delay * (1.0 + self.config.jitter * rand::rng().random_range(-1.0..1.0));
104104
self.next_delay_secs = self
105105
.config
106106
.max_delay

0 commit comments

Comments
 (0)