mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +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
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
||||
&mut self.head.headers
|
||||
}
|
||||
|
||||
/// Request extensions
|
||||
#[inline]
|
||||
fn extensions(&self) -> Ref<Extensions> {
|
||||
|
@ -78,6 +78,12 @@ impl<P> ServiceRequest<P> {
|
||||
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.
|
||||
#[inline]
|
||||
pub fn path(&self) -> &str {
|
||||
@ -134,12 +140,6 @@ impl<P> HttpMessage for ServiceRequest<P> {
|
||||
&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
|
||||
#[inline]
|
||||
fn extensions(&self) -> Ref<Extensions> {
|
||||
@ -230,11 +230,6 @@ impl<P> HttpMessage for ServiceFromRequest<P> {
|
||||
self.req.headers()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn headers_mut(&mut self) -> &mut HeaderMap {
|
||||
self.req.headers_mut()
|
||||
}
|
||||
|
||||
/// Request extensions
|
||||
#[inline]
|
||||
fn extensions(&self) -> Ref<Extensions> {
|
||||
|
Loading…
Reference in New Issue
Block a user