diff --git a/src/server/request.rs b/src/server/request.rs index aab33e2762..e2085411a6 100644 --- a/src/server/request.rs +++ b/src/server/request.rs @@ -78,6 +78,8 @@ impl<'a, 'b: 'a> Request<'a, 'b> { /// Get a reference to the underlying Ssl stream, if connected /// over HTTPS. /// + /// This is actually just an alias for `downcast_ref`. + /// /// # Example /// /// ```rust @@ -95,11 +97,7 @@ impl<'a, 'b: 'a> Request<'a, 'b> { /// ``` #[inline] pub fn ssl(&self) -> Option<&T> { - use ::net::HttpsStream; - match self.downcast_ref() { - Some(&HttpsStream::Https(ref s)) => Some(s), - _ => None - } + self.downcast_ref() } /// Deconstruct a Request into its constituent parts.