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:
		| @@ -1,7 +1,7 @@ | ||||
| use std::fmt; | ||||
| use std::io::IoSlice; | ||||
|  | ||||
| use bytes::buf::ext::{BufExt, Chain, Take}; | ||||
| use bytes::buf::{Chain, Take}; | ||||
| use bytes::Buf; | ||||
|  | ||||
| use super::io::WriteBuf; | ||||
|   | ||||
| @@ -3,6 +3,7 @@ use std::cmp; | ||||
| use std::fmt; | ||||
| use std::io::{self, IoSlice}; | ||||
| use std::marker::Unpin; | ||||
| use std::mem::MaybeUninit; | ||||
|  | ||||
| use bytes::{Buf, BufMut, Bytes, BytesMut}; | ||||
| use tokio::io::{AsyncRead, AsyncWrite, ReadBuf}; | ||||
| @@ -191,7 +192,10 @@ where | ||||
|         if self.read_buf_remaining_mut() < next { | ||||
|             self.read_buf.reserve(next); | ||||
|         } | ||||
|         let mut buf = ReadBuf::uninit(&mut self.read_buf.bytes_mut()[..]); | ||||
|  | ||||
|         let dst = self.read_buf.bytes_mut(); | ||||
|         let dst = unsafe { &mut *(dst as *mut _ as *mut [MaybeUninit<u8>]) }; | ||||
|         let mut buf = ReadBuf::uninit(dst); | ||||
|         match Pin::new(&mut self.io).poll_read(cx, &mut buf) { | ||||
|             Poll::Ready(Ok(_)) => { | ||||
|                 let n = buf.filled().len(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user