feat(lib): Upgrade to Tokio 1.0 (#2369)

Closes #2370
This commit is contained in:
Sean McArthur
2020-12-23 10:36:12 -08:00
committed by GitHub
parent dad5c8792f
commit fad42acc79
14 changed files with 71 additions and 146 deletions

View File

@@ -257,8 +257,8 @@ impl<B: Buf> Buf for SendBuf<B> {
}
#[inline]
fn bytes(&self) -> &[u8] {
self.0.as_ref().map(|b| b.bytes()).unwrap_or(&[])
fn chunk(&self) -> &[u8] {
self.0.as_ref().map(|b| b.chunk()).unwrap_or(&[])
}
#[inline]
@@ -268,7 +268,7 @@ impl<B: Buf> Buf for SendBuf<B> {
}
}
fn bytes_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
self.0.as_ref().map(|b| b.bytes_vectored(dst)).unwrap_or(0)
fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
self.0.as_ref().map(|b| b.chunks_vectored(dst)).unwrap_or(0)
}
}