Skip to content

Commit 3983899

Browse files
ata-no-oneRenovate BotGermanCoding
authored
rust: Update Rust crate rand to 0.9.0 (#715)
* rust: Update Rust crate rand to 0.9.0 * rust: Update tests to rand 0.9.0 * rust: Restore version --------- Co-authored-by: Renovate Bot <renovate-bot@gdata.de> Co-authored-by: Fröhling, Maximilian <Maximilian.Froehling@gdata.de>
1 parent 2e930d6 commit 3983899

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ regex = "1.10.4"
2121
tokio = { version = "1.37", features = ["sync", "fs"] }
2222
sha2 = "0.10.8"
2323
futures = "0.3.30"
24-
rand = "0.8.5"
24+
rand = "0.9.0"
2525
async-trait = "0.1.80"
2626
bytes = "1.6.0"
2727
tokio-util = "0.7.11"

rust/tests/real_api_integration_tests.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use futures::future::try_join_all;
2-
use rand::{distributions::Alphanumeric, Rng};
2+
use rand::distr::Alphanumeric;
3+
use rand::Rng;
34
use reqwest::Url;
45
use std::convert::TryFrom;
56
use std::ops::Deref;
@@ -426,7 +427,7 @@ async fn from_file_single_clean_file() {
426427

427428
#[tokio::test]
428429
async fn from_file_single_unknown_file() {
429-
let unknown: String = rand::thread_rng()
430+
let unknown: String = rand::rng()
430431
.sample_iter(&Alphanumeric)
431432
.take(50)
432433
.map(char::from)
@@ -449,12 +450,12 @@ async fn from_file_single_unknown_file() {
449450

450451
#[tokio::test]
451452
async fn from_files_unknown_files() {
452-
let unknown1: String = rand::thread_rng()
453+
let unknown1: String = rand::rng()
453454
.sample_iter(&Alphanumeric)
454455
.take(50)
455456
.map(char::from)
456457
.collect();
457-
let unknown2: String = rand::thread_rng()
458+
let unknown2: String = rand::rng()
458459
.sample_iter(&Alphanumeric)
459460
.take(50)
460461
.map(char::from)

0 commit comments

Comments
 (0)