mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-31 02:52:53 +01:00
update HttpMessage impls
This commit is contained in:
parent
81273f71ef
commit
f71354783e
@ -117,11 +117,6 @@ impl HttpMessage for HttpRequest {
|
|||||||
&self.head().headers
|
&self.head().headers
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
|
||||||
&mut self.head.headers
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Request extensions
|
/// Request extensions
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extensions(&self) -> Ref<Extensions> {
|
fn extensions(&self) -> Ref<Extensions> {
|
||||||
|
@ -78,6 +78,12 @@ impl<P> ServiceRequest<P> {
|
|||||||
self.head().version
|
self.head().version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
/// Returns mutable Request's headers.
|
||||||
|
pub fn headers_mut(&mut self) -> &mut HeaderMap {
|
||||||
|
&mut self.head_mut().headers
|
||||||
|
}
|
||||||
|
|
||||||
/// The target path of this Request.
|
/// The target path of this Request.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn path(&self) -> &str {
|
pub fn path(&self) -> &str {
|
||||||
@ -134,12 +140,6 @@ impl<P> HttpMessage for ServiceRequest<P> {
|
|||||||
&self.head().headers
|
&self.head().headers
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
/// Mutable reference to the request's headers.
|
|
||||||
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> {
|
||||||
@ -230,11 +230,6 @@ impl<P> HttpMessage for ServiceFromRequest<P> {
|
|||||||
self.req.headers()
|
self.req.headers()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
|
||||||
self.req.headers_mut()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Request extensions
|
/// Request extensions
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extensions(&self) -> Ref<Extensions> {
|
fn extensions(&self) -> Ref<Extensions> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user