From d0249d8f166dd9aa0cffbb4f7c1390f6c187fcad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:38:59 +0000 Subject: [PATCH] fix(deps): bump rand from 0.9.0-alpha.2 to 0.9.0-beta.0 Bumps [rand](https://github.com/rust-random/rand) from 0.9.0-alpha.2 to 0.9.0-beta.0. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.9.0-alpha.2...0.9.0-beta.0) --- updated-dependencies: - dependency-name: rand dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 52 ++++++++++++++++++++++++++++++++++--------------- Cargo.toml | 2 +- src/password.rs | 4 ++-- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fee739a..8f5f052 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,7 +27,7 @@ dependencies = [ "getrandom", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -2276,7 +2276,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -2374,7 +2374,7 @@ dependencies = [ "ntest", "postgres", "predicates", - "rand 0.9.0-alpha.2", + "rand 0.9.0-beta.0", "reqwest", "schemars", "serde", @@ -2459,13 +2459,13 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0-alpha.2" +version = "0.9.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e256ff62cee3e03def855c4d4260106d2bb1696fdc01af03e9935b993720a5" +checksum = "64535f75665ca4111b59c1b2c9eb99358dc57c3775cc3379675c11dca030f81a" dependencies = [ - "rand_chacha 0.9.0-alpha.2", - "rand_core 0.9.0-alpha.2", - "zerocopy", + "rand_chacha 0.9.0-beta.0", + "rand_core 0.9.0-beta.0", + "zerocopy 0.8.11", ] [[package]] @@ -2480,12 +2480,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.9.0-alpha.2" +version = "0.9.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d299e9db34f6623b2a9e86c015d6e173d5f46d64d4b9b8cc46ae8a982a50b04c" +checksum = "6ae4df114eac4201e5830fbecc6b8f775425e5782ac6741f5ba2c8d5e7861136" dependencies = [ "ppv-lite86", - "rand_core 0.9.0-alpha.2", + "rand_core 0.9.0-beta.0", ] [[package]] @@ -2499,12 +2499,12 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.0-alpha.2" +version = "0.9.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e93f5a5e3c528cda9acb0928c31b2ba868c551cc46e67b778075e34aab9906" +checksum = "faff9cb0513c709c88c66ba1c44e7dfb0e6343494c57576614524400ee60d7cb" dependencies = [ "getrandom", - "zerocopy", + "zerocopy 0.8.11", ] [[package]] @@ -3723,7 +3723,7 @@ dependencies = [ "futures", "k8s-openapi", "kube", - "rand 0.9.0-alpha.2", + "rand 0.9.0-beta.0", "reqwest", "rustls", "serde", @@ -4151,7 +4151,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce3b5629d87654b53a49002acc2ce64aa5aa7255f5c718374a37ac7fd98c218" +dependencies = [ + "zerocopy-derive 0.8.11", ] [[package]] @@ -4165,6 +4174,17 @@ dependencies = [ "syn 2.0.82", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74a82c26c3986af2623ec9eb890ff4aa19c006e30a1133dc9bd1830ec1612e20" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "zeroize" version = "1.8.1" diff --git a/Cargo.toml b/Cargo.toml index 39c8197..3c95ece 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ env_logger = "0.11.5" lazy_static = "1.5.0" log = "0.4.22" postgres = "0.19.9" -rand = "0.9.0-alpha.2" +rand = "0.9.0-beta.0" serde = { version = "1.0.215", features = ["derive"] } reqwest = { version = "0.12.9", features = ["json"] } serde_json = "1.0.133" diff --git a/src/password.rs b/src/password.rs index 03cc509..c9185fb 100644 --- a/src/password.rs +++ b/src/password.rs @@ -5,12 +5,12 @@ use log::trace; use rand::distr::Alphanumeric; -use rand::{thread_rng, Rng}; +use rand::{rng, Rng}; pub(crate) fn generate_random_password(length: usize) -> String { trace!("Generating random password"); - let mut rng = thread_rng(); + let mut rng = rng(); let password: String = (0..length) .map(|_| rng.sample(Alphanumeric) as char) .collect();