feat(body): Update Payload to be a trait alias of http_body::Body (#1908)
This commit is contained in:
committed by
Sean McArthur
parent
49b12c415d
commit
79c32f8953
@@ -298,7 +298,7 @@ mod response_body_lengths {
|
||||
|
||||
#[test]
|
||||
fn http2_auto_response_with_known_length() {
|
||||
use hyper::body::Payload;
|
||||
use http_body::Body;
|
||||
|
||||
let server = serve();
|
||||
let addr_str = format!("http://{}", server.addr());
|
||||
@@ -317,7 +317,7 @@ mod response_body_lengths {
|
||||
.get(uri)
|
||||
.map_ok(|res| {
|
||||
assert_eq!(res.headers().get("content-length").unwrap(), "13");
|
||||
assert_eq!(res.body().content_length(), Some(13));
|
||||
assert_eq!(res.body().size_hint().exact(), Some(13));
|
||||
()
|
||||
})
|
||||
.map_err(|_e| ())
|
||||
@@ -326,7 +326,7 @@ mod response_body_lengths {
|
||||
|
||||
#[test]
|
||||
fn http2_auto_response_with_conflicting_lengths() {
|
||||
use hyper::body::Payload;
|
||||
use http_body::Body;
|
||||
|
||||
let server = serve();
|
||||
let addr_str = format!("http://{}", server.addr());
|
||||
@@ -348,7 +348,7 @@ mod response_body_lengths {
|
||||
.get(uri)
|
||||
.map_ok(|res| {
|
||||
assert_eq!(res.headers().get("content-length").unwrap(), "10");
|
||||
assert_eq!(res.body().content_length(), Some(10));
|
||||
assert_eq!(res.body().size_hint().exact(), Some(10));
|
||||
()
|
||||
})
|
||||
.map_err(|_e| ())
|
||||
|
||||
Reference in New Issue
Block a user