1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

change rustfmt line width to 96

This commit is contained in:
Rob Ede
2021-02-11 23:03:17 +00:00
parent c1af5089b9
commit 31d9ed81c5
56 changed files with 463 additions and 756 deletions

View File

@ -51,8 +51,7 @@ const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
#[actix_rt::test]
async fn test_simple() {
let srv = test::start(|| {
App::new()
.service(web::resource("/").route(web::to(|| HttpResponse::Ok().body(STR))))
App::new().service(web::resource("/").route(web::to(|| HttpResponse::Ok().body(STR))))
});
let request = srv.get("/").insert_header(("x-test", "111")).send();
@ -612,9 +611,8 @@ async fn test_client_streaming_explicit() {
}))
});
let body = stream::once(async {
Ok::<_, actix_http::Error>(Bytes::from_static(STR.as_bytes()))
});
let body =
stream::once(async { Ok::<_, actix_http::Error>(Bytes::from_static(STR.as_bytes())) });
let req = srv.post("/").send_stream(Box::pin(body));
let mut res = req.await.unwrap();

View File

@ -64,8 +64,7 @@ async fn test_connection_reuse_h2() {
.and_then(
HttpService::build()
.h2(map_config(
App::new()
.service(web::resource("/").route(web::to(HttpResponse::Ok))),
App::new().service(web::resource("/").route(web::to(HttpResponse::Ok))),
|_| AppConfig::default(),
))
.rustls(tls_config())

View File

@ -48,8 +48,7 @@ async fn test_connection_reuse_h2() {
.and_then(
HttpService::build()
.h2(map_config(
App::new()
.service(web::resource("/").route(web::to(HttpResponse::Ok))),
App::new().service(web::resource("/").route(web::to(HttpResponse::Ok))),
|_| AppConfig::default(),
))
.openssl(ssl_acceptor())