Skip to content

Commit

Permalink
feat(http): add Into<Bytes> for Chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Mar 2, 2017
1 parent abad0fc commit fac3d70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/http/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ impl From<Bytes> for Chunk {
}
}

impl From<Chunk> for Bytes {
fn from(chunk: Chunk) -> Bytes {
match self.0 {

This comment has been minimized.

Copy link
@scottlamb

scottlamb Mar 2, 2017

I get a build error on this line:

error[E0424]: expected value, found module `self`
  --> /home/slamb/.cargo/git/checkouts/hyper-817b53a166fc1c58/fac3d70/src/http/chunk.rs:48:15
   |
48 |         match self.0 {
   |               ^^^^ `self` value is only available in methods with `self` parameter
Inner::Shared(bytes) => bytes,
}
}
}

impl ::std::ops::Deref for Chunk {
type Target = [u8];

Expand Down

0 comments on commit fac3d70

Please sign in to comment.