Skip to content

Commit 5b5f401

Browse files
djcrami3l
authored andcommitted
Upgrade to rand 0.9
1 parent 069e641 commit 5b5f401

File tree

3 files changed

+102
-21
lines changed

3 files changed

+102
-21
lines changed

Cargo.lock

Lines changed: 99 additions & 18 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
@@ -57,7 +57,7 @@ opentelemetry = { workspace = true, optional = true }
5757
opentelemetry-otlp = { workspace = true, optional = true }
5858
opentelemetry_sdk = { workspace = true, optional = true }
5959
pulldown-cmark = { version = "0.12", default-features = false }
60-
rand = "0.8"
60+
rand = "0.9"
6161
regex = "1"
6262
remove_dir_all = { version = "1.0.0", features = ["parallel"] }
6363
retry = { version = "2", default-features = false, features = ["random"] }

src/utils/raw.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ pub fn path_exists<P: AsRef<Path>>(path: P) -> bool {
5959
pub(crate) fn random_string(length: usize) -> String {
6060
use rand::Rng;
6161
const CHARSET: &[u8] = b"abcdefghijklmnopqrstuvwxyz0123456789_";
62-
let mut rng = rand::thread_rng();
62+
let mut rng = rand::rng();
6363
(0..length)
64-
.map(|_| char::from(CHARSET[rng.gen_range(0..CHARSET.len())]))
64+
.map(|_| char::from(CHARSET[rng.random_range(..CHARSET.len())]))
6565
.collect()
6666
}
6767

0 commit comments

Comments
 (0)