Skip to content

Commit

Permalink
feat(net): make HttpStream implement Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonson committed Apr 9, 2015
1 parent 7262e91 commit 7b7f9c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,15 @@ pub enum HttpStream {
Https(SslStream<CloneTcpStream>),
}

impl fmt::Debug for HttpStream {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
HttpStream::Http(_) => write!(fmt, "Http HttpStream"),
HttpStream::Https(_) => write!(fmt, "Https HttpStream"),
}
}
}

impl Read for HttpStream {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
Expand Down

0 comments on commit 7b7f9c2

Please sign in to comment.