Skip to content

Commit f5567db

Browse files
committed
feat(http): implement Default for Chunk
This allows using `Stream::concat2` with a `hyper::Body`.
1 parent 154ab29 commit f5567db

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/http/chunk.rs

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ impl fmt::Debug for Chunk {
109109
}
110110
}
111111

112+
impl Default for Chunk {
113+
#[inline]
114+
fn default() -> Chunk {
115+
Chunk(Inner::Shared(Bytes::new()))
116+
}
117+
}
118+
112119
impl IntoIterator for Chunk {
113120
type Item = u8;
114121
type IntoIter = <Bytes as IntoIterator>::IntoIter;

0 commit comments

Comments
 (0)