Skip to content

Commit 0abddf0

Browse files
committed
deps: update rand to 0.9
1 parent bfea484 commit 0abddf0

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Cargo.lock

Lines changed: 6 additions & 6 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
@@ -42,15 +42,15 @@ clap_complete = "4.5.46"
4242
colored = "3.0.0"
4343
config = { version = "0.15.11", default-features = false, features = ["yaml"] }
4444
criterion = "0.5.1"
45-
fake = "3.1.0"
45+
fake = "4.0.0"
4646
futures = "0.3.31"
4747
google-generative-ai-rs = { version = "0.3.4", features = ["beta"] }
4848
hex = "0.4.3"
4949
log = "0.4.26"
5050
linkify = "0.10.0"
5151
quickcheck = "1.0.3"
5252
quickcheck_macros = "1.0.0"
53-
rand = "0.8.5"
53+
rand = "0.9.0"
5454
regex = "1.11.1"
5555
reqwest = { version = "0.12.14", default-features = false, features = [
5656
"json",

clex_gen/src/clex_language/code_generator.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Generator {
144144
max,
145145
));
146146
}
147-
Ok(rand::thread_rng().gen_range(min..=max))
147+
Ok(rand::random_range(min..=max))
148148
}
149149

150150
// Helper method for generating random positive integers
@@ -156,7 +156,7 @@ impl Generator {
156156
max as i64,
157157
));
158158
}
159-
Ok(rand::thread_rng().gen_range(min..=max))
159+
Ok(rand::random_range(min..=max))
160160
}
161161

162162
fn generate_random_string(
@@ -175,10 +175,10 @@ impl Generator {
175175

176176
fn generate_random_string_from_charset(charset: &str, length: u64) -> String {
177177
let charset = charset.as_bytes();
178-
let mut rng = rand::thread_rng();
178+
let mut rng = rand::rng();
179179
(0..length)
180180
.map(|_| {
181-
let idx = rng.gen_range(0..charset.len());
181+
let idx = rng.random_range(0..charset.len());
182182
charset[idx] as char
183183
})
184184
.collect()
@@ -225,7 +225,7 @@ impl Generator {
225225
));
226226
}
227227

228-
Ok(rand::thread_rng().gen_range(min..=max))
228+
Ok(rand::random_range(min..=max))
229229
}
230230

231231
fn get_value_from_reference(

0 commit comments

Comments
 (0)