1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

Expose factory traits and some clippy fixes (#983)

This commit is contained in:
Ravi Shankar
2019-07-17 12:28:42 +05:30
committed by Nikolay Kim
parent c01611d8b5
commit 32718b7e31
13 changed files with 16 additions and 9 deletions

View File

@ -107,6 +107,7 @@ where
self.service.poll_ready()
}
#[allow(clippy::borrow_interior_mutable_const)]
fn call(&mut self, req: ServiceRequest) -> Self::Future {
// negotiate content-encoding
let encoding = if let Some(val) = req.headers().get(&ACCEPT_ENCODING) {

View File

@ -125,6 +125,7 @@ where
self.service.poll_ready()
}
#[allow(clippy::borrow_interior_mutable_const)]
fn call(&mut self, req: ServiceRequest) -> Self::Future {
let inner = self.inner.clone();

View File

@ -415,9 +415,9 @@ impl FormatText {
))
};
}
FormatText::UrlPath => *self = FormatText::Str(format!("{}", req.path())),
FormatText::UrlPath => *self = FormatText::Str(req.path().to_string()),
FormatText::RequestTime => {
*self = FormatText::Str(format!("{}", now.rfc3339()))
*self = FormatText::Str(now.rfc3339().to_string())
}
FormatText::RequestHeader(ref name) => {
let s = if let Some(val) = req.headers().get(name) {