mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
do not expose headers_mut via HttpMessage
This commit is contained in:
parent
496ee8d039
commit
d85468f7e1
@ -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<Extensions> {
|
||||
self.head.extensions()
|
||||
}
|
||||
|
@ -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<Self::Stream>;
|
||||
|
||||
@ -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::Stream> {
|
||||
(**self).take_payload()
|
||||
|
@ -22,11 +22,6 @@ impl<P> HttpMessage for Request<P> {
|
||||
&self.head().headers
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
||||
&mut self.head_mut().headers
|
||||
}
|
||||
|
||||
/// Request extensions
|
||||
#[inline]
|
||||
fn extensions(&self) -> Ref<Extensions> {
|
||||
@ -107,6 +102,11 @@ impl<P> Request<P> {
|
||||
&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 {
|
||||
|
Loading…
Reference in New Issue
Block a user