mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-30 18:44:35 +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
|
&self.head.headers
|
||||||
}
|
}
|
||||||
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
|
||||||
&mut self.head.headers
|
|
||||||
}
|
|
||||||
|
|
||||||
fn extensions(&self) -> Ref<Extensions> {
|
fn extensions(&self) -> Ref<Extensions> {
|
||||||
self.head.extensions()
|
self.head.extensions()
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,6 @@ pub trait HttpMessage: Sized {
|
|||||||
/// Read the message headers.
|
/// Read the message headers.
|
||||||
fn headers(&self) -> &HeaderMap;
|
fn headers(&self) -> &HeaderMap;
|
||||||
|
|
||||||
/// Mutable reference to the message's headers.
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap;
|
|
||||||
|
|
||||||
/// Message payload stream
|
/// Message payload stream
|
||||||
fn take_payload(&mut self) -> Payload<Self::Stream>;
|
fn take_payload(&mut self) -> Payload<Self::Stream>;
|
||||||
|
|
||||||
@ -280,11 +277,6 @@ where
|
|||||||
(**self).headers()
|
(**self).headers()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mutable reference to the message's headers.
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
|
||||||
(**self).headers_mut()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Message payload stream
|
/// Message payload stream
|
||||||
fn take_payload(&mut self) -> Payload<Self::Stream> {
|
fn take_payload(&mut self) -> Payload<Self::Stream> {
|
||||||
(**self).take_payload()
|
(**self).take_payload()
|
||||||
|
@ -22,11 +22,6 @@ impl<P> HttpMessage for Request<P> {
|
|||||||
&self.head().headers
|
&self.head().headers
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
|
||||||
&mut self.head_mut().headers
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Request extensions
|
/// Request extensions
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extensions(&self) -> Ref<Extensions> {
|
fn extensions(&self) -> Ref<Extensions> {
|
||||||
@ -107,6 +102,11 @@ impl<P> Request<P> {
|
|||||||
&mut *self.head
|
&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.
|
/// Request's uri.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn uri(&self) -> &Uri {
|
pub fn uri(&self) -> &Uri {
|
||||||
|
Loading…
Reference in New Issue
Block a user