feat(http): add Into<Bytes> for Chunk
This commit is contained in:
		| @@ -43,6 +43,14 @@ impl From<Bytes> for Chunk { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | impl From<Chunk> for Bytes { | ||||||
|  |     fn from(chunk: Chunk) -> Bytes { | ||||||
|  |         match self.0 { | ||||||
|  |             Inner::Shared(bytes) => bytes, | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
| impl ::std::ops::Deref for Chunk { | impl ::std::ops::Deref for Chunk { | ||||||
|     type Target = [u8]; |     type Target = [u8]; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user