From 410bb30c64534f8b2cceef536121366591c89590 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Wed, 29 Jan 2025 15:15:25 +0100 Subject: [PATCH] split: adapt tests to API changes of rand --- tests/by-util/test_split.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_split.rs b/tests/by-util/test_split.rs index e6e91cccc..9e58cfd42 100644 --- a/tests/by-util/test_split.rs +++ b/tests/by-util/test_split.rs @@ -5,7 +5,7 @@ // spell-checker:ignore xzaaa sixhundredfiftyonebytes ninetyonebytes threebytes asciilowercase ghijkl mnopq rstuv wxyz fivelines twohundredfortyonebytes onehundredlines nbbbb dxen ncccc rlimit NOFILE use crate::common::util::{AtPath, TestScenario}; -use rand::{thread_rng, Rng, SeedableRng}; +use rand::{rng, Rng, SeedableRng}; use regex::Regex; #[cfg(any(target_os = "linux", target_os = "android"))] use rlimit::Resource; @@ -18,8 +18,8 @@ use std::{ }; fn random_chars(n: usize) -> String { - thread_rng() - .sample_iter(&rand::distributions::Alphanumeric) + rng() + .sample_iter(&rand::distr::Alphanumeric) .map(char::from) .take(n) .collect::()