Skip to content

Commit 0bcc625

Browse files
authored
Bump rand to 0.9 (#1686)
* Bump rand to 0.9 and update renamed fn Signed-off-by: clux <[email protected]> * fmt Signed-off-by: clux <[email protected]> * deny exclude dupes: man that's a lot of deps for rand.. Signed-off-by: clux <[email protected]> * some more breaking changes Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
1 parent 5b589ce commit 0bcc625

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pem = "3.0.1"
6868
pin-project = "1.0.4"
6969
proc-macro2 = "1.0.29"
7070
quote = "1.0.10"
71-
rand = "0.8.3"
71+
rand = "0.9.0"
7272
rustls = { version = "0.23.16", default-features = false }
7373
rustls-pemfile = "2.0.0"
7474
schemars = "0.8.6"

deny.toml

+14
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,17 @@ name = "thiserror-impl"
9797
name = "security-framework"
9898
[[bans.skip]]
9999
name = "core-foundation"
100+
101+
# currently tungstenite hasn't upgraded rand to 0.9 yet, all these are related
102+
[[bans.skip]]
103+
name = "rand"
104+
[[bans.skip]]
105+
name = "rand_core"
106+
[[bans.skip]]
107+
name = "rand_chacha"
108+
[[bans.skip]]
109+
name = "getrandom"
110+
[[bans.skip]]
111+
name = "wasi"
112+
[[bans.skip]]
113+
name = "zerocopy"

kube-runtime/src/reflector/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ mod tests {
141141
use futures::{stream, StreamExt, TryStreamExt};
142142
use k8s_openapi::{api::core::v1::ConfigMap, apimachinery::pkg::apis::meta::v1::ObjectMeta};
143143
use rand::{
144-
distributions::{Bernoulli, Uniform},
144+
distr::{Bernoulli, Uniform},
145145
Rng,
146146
};
147147
use std::collections::{BTreeMap, HashMap};
@@ -256,8 +256,8 @@ mod tests {
256256

257257
#[tokio::test]
258258
async fn reflector_store_should_not_contain_duplicates() {
259-
let mut rng = rand::thread_rng();
260-
let item_dist = Uniform::new(0_u8, 100);
259+
let mut rng = rand::rng();
260+
let item_dist = Uniform::new(0_u8, 100).unwrap();
261261
let deleted_dist = Bernoulli::new(0.40).unwrap();
262262
let store_w = store::Writer::default();
263263
let store = store_w.as_reader();

0 commit comments

Comments
 (0)