Skip to content

Commit 1d816d3

Browse files
authored
Merge pull request #1265 from jerus-org/renovate/rand-0.x
fix(deps): update rust crate rand to 0.9.0
2 parents 5a52ade + c6534b2 commit 1d816d3

File tree

16 files changed

+207
-123
lines changed

16 files changed

+207
-123
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
"mockd",
1212
"panicbit",
1313
"remoteip",
14+
"resp",
1415
"sitekey",
1516
"sitekeys",
1617
"siteverify",
1718
"Struct",
18-
"thisisnotapropertoken"
19+
"thisisnotapropertoken",
20+
"thisisthelonglistofcharactersthatformsaresponse"
1921
],
2022
"conventionalCommits.scopes": [
2123
"lambda-contact",

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- deps: update github/codeql-action action to v3.28.8(pr [#1262])
1313
- deps: update rust crate serde_json to 1.0.138(pr [#1263])
1414
- deps: update rust crate mockd to 0.4.37(pr [#1264])
15+
- deps: update rust crate rand to 0.9.0(pr [#1265])
1516

1617
## [3.0.6] - 2025-01-25
1718

@@ -977,6 +978,7 @@ emitted if a tracing subscriber is not found.
977978
[#1262]: https://github.com/jerus-org/hcaptcha-rs/pull/1262
978979
[#1263]: https://github.com/jerus-org/hcaptcha-rs/pull/1263
979980
[#1264]: https://github.com/jerus-org/hcaptcha-rs/pull/1264
981+
[#1265]: https://github.com/jerus-org/hcaptcha-rs/pull/1265
980982
[Unreleased]: https://github.com/jerus-org/hcaptcha-rs/compare/v3.0.6...HEAD
981983
[3.0.6]: https://github.com/jerus-org/hcaptcha-rs/compare/v3.0.5...v3.0.6
982984
[3.0.5]: https://github.com/jerus-org/hcaptcha-rs/compare/v3.0.4...v3.0.5

Cargo.lock

Lines changed: 103 additions & 22 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
@@ -38,7 +38,7 @@ mockd = { version = "0.4.37", features = ["internet", "unique", "words"] }
3838
proc-macro2 = "1.0.93"
3939
proc-macro-error2 = "2.0.1"
4040
quote = "1.0.38"
41-
rand = "0.8.5"
41+
rand = "0.9.0"
4242
reqwest = { version = "0.12.12", default-features = false, features = [
4343
"json",
4444
"http2",

hcaptcha/src/captcha.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ impl Captcha {
267267
///
268268
/// assert_eq!(response, captcha.response().to_string());
269269
///
270-
/// # use rand::distributions::Alphanumeric;
271-
/// # use rand::{thread_rng, Rng};
270+
/// # use rand::distr::Alphanumeric;
271+
/// # use rand::{rng, Rng};
272272
/// # use std::iter;
273273
/// # fn random_response() -> String {
274-
/// # let mut rng = thread_rng();
274+
/// # let mut rng = rng();
275275
/// # iter::repeat(())
276276
/// # .map(|()| rng.sample(Alphanumeric))
277277
/// # .map(char::from)
@@ -328,11 +328,11 @@ impl Captcha {
328328
/// assert_eq!(remoteip, v.to_string());
329329
/// }
330330
///
331-
/// # use rand::distributions::Alphanumeric;
332-
/// # use rand::{thread_rng, Rng};
331+
/// # use rand::distr::Alphanumeric;
332+
/// # use rand::{rng, Rng};
333333
/// # use std::iter;
334334
/// # fn random_response() -> String {
335-
/// # let mut rng = thread_rng();
335+
/// # let mut rng = rng();
336336
/// # iter::repeat(())
337337
/// # .map(|()| rng.sample(Alphanumeric))
338338
/// # .map(char::from)
@@ -386,11 +386,11 @@ impl Captcha {
386386
/// assert_eq!(sitekey, v.to_string());
387387
/// };
388388
///
389-
/// # use rand::distributions::Alphanumeric;
390-
/// # use rand::{thread_rng, Rng};
389+
/// # use rand::distr::Alphanumeric;
390+
/// # use rand::{rng, Rng};
391391
/// # use std::iter;
392392
/// # fn random_response() -> String {
393-
/// # let mut rng = thread_rng();
393+
/// # let mut rng = rng();
394394
/// # iter::repeat(())
395395
/// # .map(|()| rng.sample(Alphanumeric))
396396
/// # .map(char::from)
@@ -429,12 +429,12 @@ mod tests {
429429
use super::*;
430430
use crate::Code;
431431
use claims::{assert_err, assert_none, assert_ok, assert_some};
432-
use rand::distributions::Alphanumeric;
433-
use rand::{thread_rng, Rng};
432+
use rand::distr::Alphanumeric;
433+
use rand::{rng, Rng};
434434
use std::iter;
435435

436436
fn random_response() -> String {
437-
let mut rng = thread_rng();
437+
let mut rng = rng();
438438
iter::repeat(())
439439
.map(|()| rng.sample(Alphanumeric))
440440
.map(char::from)

0 commit comments

Comments
 (0)