mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 15:07:42 +02:00
build(deps): update rand requirement from 0.8 to 0.9 (#3564)
* build(deps): update rand requirement from 0.8 to 0.9 Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.0...0.9.0) --- updated-dependencies: - dependency-name: rand dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix rand upgrade * chore: address clippy lint --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@ -20,7 +20,7 @@ use base64::prelude::*;
|
||||
use bytes::Bytes;
|
||||
use cookie::Cookie;
|
||||
use futures_util::stream;
|
||||
use rand::Rng;
|
||||
use rand::distr::{Alphanumeric, SampleString as _};
|
||||
|
||||
mod utils;
|
||||
|
||||
@ -516,11 +516,7 @@ async fn client_gzip_encoding_large() {
|
||||
#[cfg(feature = "compress-gzip")]
|
||||
#[actix_rt::test]
|
||||
async fn client_gzip_encoding_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&rand::distributions::Alphanumeric)
|
||||
.take(100_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 100_000);
|
||||
|
||||
let srv = actix_test::start(|| {
|
||||
App::new().service(web::resource("/").route(web::to(|data: Bytes| async {
|
||||
@ -562,11 +558,7 @@ async fn client_brotli_encoding() {
|
||||
#[cfg(feature = "compress-brotli")]
|
||||
#[actix_rt::test]
|
||||
async fn client_brotli_encoding_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&rand::distributions::Alphanumeric)
|
||||
.take(70_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 70_000);
|
||||
|
||||
let srv = actix_test::start(|| {
|
||||
App::new().service(web::resource("/").route(web::to(|data: Bytes| async {
|
||||
@ -607,11 +599,7 @@ async fn client_deflate_encoding() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn client_deflate_encoding_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(rand::distributions::Alphanumeric)
|
||||
.map(char::from)
|
||||
.take(70_000)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 70_000);
|
||||
|
||||
let srv = actix_test::start(|| {
|
||||
App::new().default_service(web::to(|body: Bytes| async {
|
||||
|
Reference in New Issue
Block a user