chore: bump to newer nightly (#1426)

This commit is contained in:
Taiki Endo
2019-08-11 02:01:20 +09:00
committed by GitHub
parent fff39c03b1
commit d9f9c5658f
44 changed files with 45 additions and 89 deletions
+6 -18
View File
@@ -31,10 +31,7 @@ pub trait AsyncBufRead: AsyncRead {
///
/// [`poll_read`]: AsyncRead::poll_read
/// [`consume`]: AsyncBufRead::consume
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>>;
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>>;
/// Tells this buffer that `amt` bytes have been consumed from the buffer,
/// so they should no longer be returned in calls to [`poll_read`].
@@ -56,8 +53,8 @@ pub trait AsyncBufRead: AsyncRead {
macro_rules! deref_async_buf_read {
() => {
fn poll_fill_buf<'a>(self: Pin<&'a mut Self>, cx: &mut Context<'_>)
-> Poll<io::Result<&'a [u8]>>
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
-> Poll<io::Result<&[u8]>>
{
Pin::new(&mut **self.get_mut()).poll_fill_buf(cx)
}
@@ -81,10 +78,7 @@ where
P: DerefMut + Unpin,
P::Target: AsyncBufRead,
{
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>> {
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
self.get_mut().as_mut().poll_fill_buf(cx)
}
@@ -94,10 +88,7 @@ where
}
impl AsyncBufRead for &[u8] {
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
_cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>> {
fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
Poll::Ready(Ok(*self))
}
@@ -107,10 +98,7 @@ impl AsyncBufRead for &[u8] {
}
impl<T: AsRef<[u8]> + Unpin> AsyncBufRead for io::Cursor<T> {
fn poll_fill_buf<'a>(
self: Pin<&'a mut Self>,
_cx: &mut Context<'_>,
) -> Poll<io::Result<&'a [u8]>> {
fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
Poll::Ready(io::BufRead::fill_buf(self.get_mut()))
}