feat(body): replace Chunk type with Bytes
Closes #1931 BREAKING CHANGE: All usage of `hyper::Chunk` should be replaced with `bytes::Bytes` (or `hyper::body::Bytes`).
This commit is contained in:
@@ -28,7 +28,7 @@ fn tcp_connect(addr: &SocketAddr) -> impl Future<Output = std::io::Result<TcpStr
|
||||
TcpStream::connect(*addr)
|
||||
}
|
||||
|
||||
async fn concat(mut body: Body) -> Result<hyper::Chunk, hyper::Error> {
|
||||
async fn concat(mut body: Body) -> Result<bytes::Bytes, hyper::Error> {
|
||||
let mut vec = Vec::new();
|
||||
while let Some(chunk) = body.next().await {
|
||||
vec.extend_from_slice(&chunk?);
|
||||
|
||||
Reference in New Issue
Block a user