Skip to content

Commit

Permalink
Bump rand to 0.9 (#1686)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
clux authored Feb 5, 2025
1 parent 5b589ce commit 0bcc625
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pem = "3.0.1"
pin-project = "1.0.4"
proc-macro2 = "1.0.29"
quote = "1.0.10"
rand = "0.8.3"
rand = "0.9.0"
rustls = { version = "0.23.16", default-features = false }
rustls-pemfile = "2.0.0"
schemars = "0.8.6"
Expand Down
14 changes: 14 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,17 @@ name = "thiserror-impl"
name = "security-framework"
[[bans.skip]]
name = "core-foundation"

# currently tungstenite hasn't upgraded rand to 0.9 yet, all these are related
[[bans.skip]]
name = "rand"
[[bans.skip]]
name = "rand_core"
[[bans.skip]]
name = "rand_chacha"
[[bans.skip]]
name = "getrandom"
[[bans.skip]]
name = "wasi"
[[bans.skip]]
name = "zerocopy"
6 changes: 3 additions & 3 deletions kube-runtime/src/reflector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ mod tests {
use futures::{stream, StreamExt, TryStreamExt};
use k8s_openapi::{api::core::v1::ConfigMap, apimachinery::pkg::apis::meta::v1::ObjectMeta};
use rand::{
distributions::{Bernoulli, Uniform},
distr::{Bernoulli, Uniform},
Rng,
};
use std::collections::{BTreeMap, HashMap};
Expand Down Expand Up @@ -256,8 +256,8 @@ mod tests {

#[tokio::test]
async fn reflector_store_should_not_contain_duplicates() {
let mut rng = rand::thread_rng();
let item_dist = Uniform::new(0_u8, 100);
let mut rng = rand::rng();
let item_dist = Uniform::new(0_u8, 100).unwrap();
let deleted_dist = Bernoulli::new(0.40).unwrap();
let store_w = store::Writer::default();
let store = store_w.as_reader();
Expand Down

0 comments on commit 0bcc625

Please sign in to comment.