Skip to content

Commit 257217d

Browse files
renovate[bot]pepicrftclaude
authored
fix(deps): update rust crate rand to 0.9 (#38)
* fix(deps): update rust crate rand to 0.9 * fix(deps): update rust crate rand to 0.9 Migrate to rand 0.9 API changes: - Replace `rand::thread_rng()` with `rand::rng()` - Replace `rng.gen()` with `rng.random()` These renames were made in rand 0.9 to avoid conflict with the `gen` keyword in Rust 2024 edition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Pedro Piñera <pedro@pepicrft.me> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 81fd848 commit 257217d

File tree

3 files changed

+46
-17
lines changed

3 files changed

+46
-17
lines changed

Cargo.lock

Lines changed: 42 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ mdns-sd = "0.11"
5353
notify-rust = "4.11"
5454
hmac = "0.12"
5555
hostname = "0.4"
56-
rand = "0.8"
56+
rand = "0.9"
5757

5858
[target.'cfg(unix)'.dependencies]
5959
nix = { version = "0.30", features = ["signal"] }
@@ -71,7 +71,7 @@ serial_test = "3"
7171
assert_cmd = "2"
7272
predicates = "3"
7373
uuid = { version = "1", features = ["v4"] }
74-
rand = "0.8"
74+
rand = "0.9"
7575

7676
[build-dependencies]
7777
tonic-prost-build = "0.14"

src/commands/p2p.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ fn generate_secret(length: usize) -> Result<()> {
171171
}
172172

173173
// Generate random bytes
174-
let mut rng = rand::thread_rng();
175-
let random_bytes: Vec<u8> = (0..length).map(|_| rng.gen()).collect();
174+
let mut rng = rand::rng();
175+
let random_bytes: Vec<u8> = (0..length).map(|_| rng.random()).collect();
176176

177177
// Encode as hexadecimal
178178
let secret = random_bytes

0 commit comments

Comments
 (0)