Skip to content

Commit

Permalink
feat(http): implement Default for Chunk
Browse files Browse the repository at this point in the history
This allows using `Stream::concat2` with a `hyper::Body`.
  • Loading branch information
seanmonstar committed May 1, 2017
1 parent 154ab29 commit f5567db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/http/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
type Item = u8;
type IntoIter = <Bytes as IntoIterator>::IntoIter;
Expand Down

0 comments on commit f5567db

Please sign in to comment.