make body return borrowed decoder

This commit is contained in:
Ashley Mannix
2017-08-19 16:32:00 +10:00
parent e2fa97254e
commit 2cb70c872a
7 changed files with 69 additions and 23 deletions

View File

@@ -66,6 +66,13 @@ pub struct Chunk {
inner: ::hyper::Chunk,
}
impl AsRef<[u8]> for Chunk {
#[inline]
fn as_ref(&self) -> &[u8] {
&*self
}
}
impl ::std::ops::Deref for Chunk {
type Target = [u8];
#[inline]