Skip to content

Commit

Permalink
Merge pull request #445 from brandonson/master
Browse files Browse the repository at this point in the history
feat(net) make HttpStreams implement Debug
  • Loading branch information
seanmonstar committed Apr 9, 2015
2 parents 7262e91 + 7b7f9c2 commit f223312
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 f223312

Please sign in to comment.