mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-27 07:19:04 +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:
@ -180,7 +180,7 @@ criterion = { version = "0.5", features = ["html_reports"] }
|
||||
env_logger = "0.11"
|
||||
flate2 = "1.0.13"
|
||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||
rand = "0.8"
|
||||
rand = "0.9"
|
||||
rcgen = "0.13"
|
||||
rustls-pemfile = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
@ -25,7 +25,7 @@ use openssl::{
|
||||
ssl::{SslAcceptor, SslMethod},
|
||||
x509::X509,
|
||||
};
|
||||
use rand::{distributions::Alphanumeric, Rng as _};
|
||||
use rand::distr::{Alphanumeric, SampleString as _};
|
||||
|
||||
mod utils;
|
||||
|
||||
@ -188,11 +188,7 @@ async fn body_gzip_large() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_body_gzip_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(70_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 70_000);
|
||||
let srv_data = data.clone();
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().h1(), move || {
|
||||
@ -432,11 +428,7 @@ async fn test_zstd_encoding() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_zstd_encoding_large() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(320_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 320_000);
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
||||
App::new().service(
|
||||
@ -529,11 +521,7 @@ async fn test_gzip_encoding_large() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_reading_gzip_encoding_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(60_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 60_000);
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
||||
App::new().service(web::resource("/").route(web::to(move |body: Bytes| async {
|
||||
@ -599,11 +587,7 @@ async fn test_reading_deflate_encoding_large() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_reading_deflate_encoding_large_random() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(160_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 160_000);
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
||||
App::new().service(web::resource("/").route(web::to(move |body: Bytes| async {
|
||||
@ -648,11 +632,7 @@ async fn test_brotli_encoding() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_brotli_encoding_large() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(320_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 320_000);
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().h1(), || {
|
||||
App::new().service(
|
||||
@ -737,11 +717,7 @@ mod plus_rustls {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_reading_deflate_encoding_large_random_rustls() {
|
||||
let data = rand::thread_rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(160_000)
|
||||
.map(char::from)
|
||||
.collect::<String>();
|
||||
let data = Alphanumeric.sample_string(&mut rand::rng(), 160_000);
|
||||
|
||||
let srv = actix_test::start_with(actix_test::config().rustls_0_23(tls_config()), || {
|
||||
App::new().service(web::resource("/").route(web::to(|bytes: Bytes| async {
|
||||
|
Reference in New Issue
Block a user