mirror of
https://github.com/actix/actix-web.git
synced 2024-11-30 05:21:09 +00:00
Merge pull request #94 from messense/feature/str-repeat
Use str::repeat
This commit is contained in:
commit
d6b021e185
2 changed files with 6 additions and 6 deletions
|
@ -118,7 +118,7 @@ fn test_client_gzip_encoding() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_client_gzip_encoding_large() {
|
fn test_client_gzip_encoding_large() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
|
|
||||||
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
||||||
req.body()
|
req.body()
|
||||||
|
|
|
@ -136,7 +136,7 @@ fn test_simple() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_headers() {
|
fn test_headers() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
let srv_data = Arc::new(data.clone());
|
let srv_data = Arc::new(data.clone());
|
||||||
let mut srv = test::TestServer::new(
|
let mut srv = test::TestServer::new(
|
||||||
move |app| {
|
move |app| {
|
||||||
|
@ -210,7 +210,7 @@ fn test_body_gzip() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_body_gzip_large() {
|
fn test_body_gzip_large() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
let srv_data = Arc::new(data.clone());
|
let srv_data = Arc::new(data.clone());
|
||||||
|
|
||||||
let mut srv = test::TestServer::new(
|
let mut srv = test::TestServer::new(
|
||||||
|
@ -464,7 +464,7 @@ fn test_gzip_encoding() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_gzip_encoding_large() {
|
fn test_gzip_encoding_large() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
||||||
req.body()
|
req.body()
|
||||||
.and_then(|bytes: Bytes| {
|
.and_then(|bytes: Bytes| {
|
||||||
|
@ -521,7 +521,7 @@ fn test_deflate_encoding() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_deflate_encoding_large() {
|
fn test_deflate_encoding_large() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
||||||
req.body()
|
req.body()
|
||||||
.and_then(|bytes: Bytes| {
|
.and_then(|bytes: Bytes| {
|
||||||
|
@ -578,7 +578,7 @@ fn test_brotli_encoding() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_brotli_encoding_large() {
|
fn test_brotli_encoding_large() {
|
||||||
let data = STR.to_owned() + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR;
|
let data = STR.repeat(10);
|
||||||
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
let mut srv = test::TestServer::new(|app| app.handler(|req: HttpRequest| {
|
||||||
req.body()
|
req.body()
|
||||||
.and_then(|bytes: Bytes| {
|
.and_then(|bytes: Bytes| {
|
||||||
|
|
Loading…
Reference in a new issue