1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-11-20 16:41:05 +00:00

update HttpMessage impls

This commit is contained in:
Nikolay Kim 2019-03-05 19:10:45 -08:00
parent 81273f71ef
commit f71354783e
2 changed files with 6 additions and 16 deletions

View file

@ -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> {

View file

@ -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> {