perf(upgrade): forward vectored writes on the Upgraded type

This commit is contained in:
Sean McArthur
2019-12-19 14:10:46 -08:00
parent 61b62eeac8
commit 6d2bcef272
4 changed files with 175 additions and 34 deletions

View File

@@ -36,6 +36,10 @@ impl<T> Rewind<T> {
pub(crate) fn into_inner(self) -> (T, Bytes) {
(self.inner, self.pre.unwrap_or_else(Bytes::new))
}
pub(crate) fn get_mut(&mut self) -> &mut T {
&mut self.inner
}
}
impl<T> AsyncRead for Rewind<T>