1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-30 08:24:28 +02:00

add test for returning App from function

This commit is contained in:
Rob Ede
2021-12-11 16:18:28 +00:00
parent b41b346c00
commit cea44be670
2 changed files with 28 additions and 6 deletions

View File

@ -10,8 +10,13 @@ use std::{
task::{Context, Poll},
};
use actix_http::header::{
ContentEncoding, ACCEPT_ENCODING, CONTENT_ENCODING, CONTENT_LENGTH, TRANSFER_ENCODING,
use actix_web::{
dev::BodyEncoding,
http::header::{
ContentEncoding, ACCEPT_ENCODING, CONTENT_ENCODING, CONTENT_LENGTH, TRANSFER_ENCODING,
},
middleware::{Compress, NormalizePath, TrailingSlash},
web, App, Error, HttpResponse,
};
use brotli2::write::{BrotliDecoder, BrotliEncoder};
use bytes::Bytes;
@ -31,10 +36,6 @@ use openssl::{
use rand::{distributions::Alphanumeric, Rng};
use zstd::stream::{read::Decoder as ZstdDecoder, write::Encoder as ZstdEncoder};
use actix_web::dev::BodyEncoding;
use actix_web::middleware::{Compress, NormalizePath, TrailingSlash};
use actix_web::{web, App, Error, HttpResponse};
const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World \