diff --git a/src/client/response.rs b/src/client/response.rs index 236a6338..7c6cdf64 100644 --- a/src/client/response.rs +++ b/src/client/response.rs @@ -24,10 +24,6 @@ impl HttpMessage for ClientResponse { &self.head.headers } - fn headers_mut(&mut self) -> &mut HeaderMap { - &mut self.head.headers - } - fn extensions(&self) -> Ref { self.head.extensions() } diff --git a/src/httpmessage.rs b/src/httpmessage.rs index d95f82f5..3c049c09 100644 --- a/src/httpmessage.rs +++ b/src/httpmessage.rs @@ -32,9 +32,6 @@ pub trait HttpMessage: Sized { /// Read the message headers. fn headers(&self) -> &HeaderMap; - /// Mutable reference to the message's headers. - fn headers_mut(&mut self) -> &mut HeaderMap; - /// Message payload stream fn take_payload(&mut self) -> Payload; @@ -280,11 +277,6 @@ where (**self).headers() } - /// Mutable reference to the message's headers. - fn headers_mut(&mut self) -> &mut HeaderMap { - (**self).headers_mut() - } - /// Message payload stream fn take_payload(&mut self) -> Payload { (**self).take_payload() diff --git a/src/request.rs b/src/request.rs index 761a159d..0ea251ea 100644 --- a/src/request.rs +++ b/src/request.rs @@ -22,11 +22,6 @@ impl

HttpMessage for Request

{ &self.head().headers } - #[inline] - fn headers_mut(&mut self) -> &mut HeaderMap { - &mut self.head_mut().headers - } - /// Request extensions #[inline] fn extensions(&self) -> Ref { @@ -107,6 +102,11 @@ impl

Request

{ &mut *self.head } + /// Mutable reference to the message's headers. + fn headers_mut(&mut self) -> &mut HeaderMap { + &mut self.head_mut().headers + } + /// Request's uri. #[inline] pub fn uri(&self) -> &Uri {