feat(http): implement Default for Chunk
This allows using `Stream::concat2` with a `hyper::Body`.
This commit is contained in:
@@ -109,6 +109,13 @@ impl fmt::Debug for Chunk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Chunk {
|
||||||
|
#[inline]
|
||||||
|
fn default() -> Chunk {
|
||||||
|
Chunk(Inner::Shared(Bytes::new()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl IntoIterator for Chunk {
|
impl IntoIterator for Chunk {
|
||||||
type Item = u8;
|
type Item = u8;
|
||||||
type IntoIter = <Bytes as IntoIterator>::IntoIter;
|
type IntoIter = <Bytes as IntoIterator>::IntoIter;
|
||||||
|
|||||||
Reference in New Issue
Block a user