Skip to content

Commit dde07bb

Browse files
committed
Update rand crate to 0.9
1 parent 54e59f5 commit dde07bb

4 files changed

Lines changed: 51 additions & 21 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bytes = { version = "1.10" }
4848
mediatype = "0.19"
4949
mockall = { version = "0.13", optional = true }
5050
protobuf = { version = "3.7.2", features = ["with-bytes"] }
51-
rand = { version = "0.8.0" }
51+
rand = { version = "0.9" }
5252
thiserror = { version = "1.0.69", optional = true }
5353
tokio = { version = "1.44", default-features = false, optional = true }
5454
tracing = { version = "0.1", default-features = false, features = ["log", "std"] }

deny.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@
1818
[licenses]
1919
allow = ["Apache-2.0", "MIT"]
2020
private = { ignore = true }
21-
exceptions = [
22-
{ name = "unicode-ident", allow = [
23-
"Unicode-3.0",
24-
] },
25-
]
21+
exceptions = [{ name = "unicode-ident", allow = ["Unicode-3.0"] }]
2622
unused-allowed-license = "deny"
2723

2824
[bans]
2925
multiple-versions = "deny"
3026
wildcards = "deny"
3127
skip-tree = [
28+
{ crate = "protobuf-codegen", reason = "this is only needed/used during the build process" },
3229
{ crate = "windows-sys", reason = "a foundational crate for many that bumps far too frequently to ever have a shared version" },
3330
]
3431

3532
[advisories]
36-
ignore = [
37-
{ id = "RUSTSEC-2025-0023", reason = "this crate does not use tokio::sync::broadcast" }
38-
]
33+
ignore = [{ id = "RUSTSEC-2025-0023", reason = "this crate does not use tokio::sync::broadcast" }]

src/uuid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ impl UUID {
132132
// fill upper 48 bits with timestamp
133133
let mut msb = (timestamp_millis << 16).to_be_bytes();
134134
// fill remaining bits with random bits
135-
rand::thread_rng().fill_bytes(&mut msb[6..]);
135+
rand::rng().fill_bytes(&mut msb[6..]);
136136
// set version (7)
137137
msb[6] = msb[6] & 0b00001111 | 0b01110000;
138138

139139
let mut lsb = [0u8; 8];
140140
// fill lsb with random bits
141-
rand::thread_rng().fill_bytes(&mut lsb);
141+
rand::rng().fill_bytes(&mut lsb);
142142
// set variant (RFC4122)
143143
lsb[0] = lsb[0] & 0b00111111 | 0b10000000;
144144
Self::from_bytes_unchecked(msb, lsb)

0 commit comments

Comments
 (0)