diff --git a/src/http/chunk.rs b/src/http/chunk.rs index 5e2216f3d7..512268aa3f 100644 --- a/src/http/chunk.rs +++ b/src/http/chunk.rs @@ -43,6 +43,14 @@ impl From for Chunk { } } +impl From for Bytes { + fn from(chunk: Chunk) -> Bytes { + match self.0 { + Inner::Shared(bytes) => bytes, + } + } +} + impl ::std::ops::Deref for Chunk { type Target = [u8];