mirror of https://github.com/fafhrd91/actix-web
remove builder use in a couple more places
This commit is contained in:
parent
427f39bf70
commit
c4b2ab0c3d
|
@ -332,8 +332,7 @@ async fn test_h2_body_length() {
|
||||||
.h2(|_| {
|
.h2(|_| {
|
||||||
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
||||||
ok::<_, ()>(
|
ok::<_, ()>(
|
||||||
Response::build(StatusCode::OK)
|
Response::ok().set_body(SizedStream::new(STR.len() as u64, body)),
|
||||||
.body(SizedStream::new(STR.len() as u64, body)),
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.openssl(tls_config())
|
.openssl(tls_config())
|
||||||
|
|
|
@ -349,8 +349,7 @@ async fn test_h2_body_length() {
|
||||||
.h2(|_| {
|
.h2(|_| {
|
||||||
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
||||||
ok::<_, ()>(
|
ok::<_, ()>(
|
||||||
Response::build(StatusCode::OK)
|
Response::ok().set_body(SizedStream::new(STR.len() as u64, body)),
|
||||||
.body(SizedStream::new(STR.len() as u64, body)),
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.rustls(tls_config())
|
.rustls(tls_config())
|
||||||
|
|
|
@ -135,8 +135,7 @@ async fn test_chunked_payload() {
|
||||||
.fold(0usize, |acc, chunk| ready(acc + chunk.len()))
|
.fold(0usize, |acc, chunk| ready(acc + chunk.len()))
|
||||||
.map(|req_size| {
|
.map(|req_size| {
|
||||||
Ok::<_, Error>(
|
Ok::<_, Error>(
|
||||||
Response::build(StatusCode::OK)
|
Response::ok().set_body(format!("size={}", req_size)),
|
||||||
.body(format!("size={}", req_size)),
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
|
@ -545,8 +544,7 @@ async fn test_h1_body_length() {
|
||||||
.h1(|_| {
|
.h1(|_| {
|
||||||
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
let body = once(ok(Bytes::from_static(STR.as_ref())));
|
||||||
ok::<_, ()>(
|
ok::<_, ()>(
|
||||||
Response::build(StatusCode::OK)
|
Response::ok().set_body(SizedStream::new(STR.len() as u64, body)),
|
||||||
.body(SizedStream::new(STR.len() as u64, body)),
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.tcp()
|
.tcp()
|
||||||
|
|
Loading…
Reference in New Issue