From cb9a45b8a4dcc286c1b03da67040d93ff2540bcb Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 7 Jun 2017 18:11:05 -0700 Subject: [PATCH] change Response::status() to return StatusCode by value --- src/response.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/response.rs b/src/response.rs index 8848ca9..0910aae 100644 --- a/src/response.rs +++ b/src/response.rs @@ -56,11 +56,11 @@ impl Response { /// Get the `StatusCode`. #[inline] - pub fn status(&self) -> &StatusCode { + pub fn status(&self) -> StatusCode { match self.inner { - Decoder::PlainText(ref hyper_response) => &hyper_response.status, + Decoder::PlainText(ref hyper_response) => hyper_response.status, Decoder::Gzip { ref head, .. } | - Decoder::Errored { ref head, .. } => &head.status, + Decoder::Errored { ref head, .. } => head.status, } }