From 7b7f9c257d0e2d515bf336c567f12a625471e477 Mon Sep 17 00:00:00 2001 From: Brandon Sanderson Date: Thu, 9 Apr 2015 13:22:48 -0700 Subject: [PATCH] feat(net): make HttpStream implement Debug --- src/net.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/net.rs b/src/net.rs index 6b0a7dd038..1fbc9b98a4 100644 --- a/src/net.rs +++ b/src/net.rs @@ -253,6 +253,15 @@ pub enum HttpStream { Https(SslStream), } +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 {