feat(lib): update bytes to 0.6, update http-body (#2339)

This branch updates `bytes` and `http-body` to the latest versions. The
`http-body` version that uses `bytes` 0.6 hasn't been released yet, so
we depend on it via a git dep for now. Presumably Hyper and `http-body`
will synchronize their releases.

Other than that, this is a pretty mechanical update. Should fix the
build and unblock the `h2` update to use vectored writes.
This commit is contained in:
Eliza Weisman
2020-11-19 16:23:32 -08:00
committed by GitHub
parent ed2b22a7f6
commit 751c122589
6 changed files with 12 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ where
let second = if let Some(buf) = body.data().await {
buf?
} else {
return Ok(first.to_bytes());
return Ok(first.copy_to_bytes(first.bytes().len()));
};
// With more than 1 buf, we gotta flatten into a Vec first.