1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Index: tokio-postgres/Cargo.toml
===================================================================
--- tokio-postgres.orig/Cargo.toml
+++ tokio-postgres/Cargo.toml
@@ -93,7 +93,7 @@ version = "0.6.8"
version = "0.2.9"
[dependencies.rand]
-version = "0.9.0"
+version = ">= 0.8.5, < 0.10"
[dependencies.tokio]
version = "1.27"
Index: tokio-postgres/src/connect.rs
===================================================================
--- tokio-postgres.orig/src/connect.rs
+++ tokio-postgres/src/connect.rs
@@ -44,7 +44,7 @@ where
let mut indices = (0..num_hosts).collect::<Vec<_>>();
if config.load_balance_hosts == LoadBalanceHosts::Random {
- indices.shuffle(&mut rand::rng());
+ indices.shuffle(&mut rand::thread_rng());
}
let mut error = None;
@@ -101,7 +101,7 @@ where
.collect::<Vec<_>>();
if config.load_balance_hosts == LoadBalanceHosts::Random {
- addrs.shuffle(&mut rand::rng());
+ addrs.shuffle(&mut rand::thread_rng());
}
let mut last_err = None;
|