mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
re-export rt in web and add main macro (#1575)
This commit is contained in:
@ -90,6 +90,7 @@ where
|
||||
self.service.poll_ready(cx)
|
||||
}
|
||||
|
||||
#[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) {
|
||||
|
@ -128,6 +128,7 @@ where
|
||||
self.service.poll_ready(cx)
|
||||
}
|
||||
|
||||
#[allow(clippy::borrow_interior_mutable_const)]
|
||||
fn call(&mut self, req: ServiceRequest) -> Self::Future {
|
||||
let inner = self.inner.clone();
|
||||
let fut = self.service.call(req);
|
||||
|
@ -478,7 +478,7 @@ impl FormatText {
|
||||
}
|
||||
FormatText::RemoteAddr => {
|
||||
let s = if let Some(ref peer) = req.connection_info().remote_addr() {
|
||||
FormatText::Str(peer.to_string())
|
||||
FormatText::Str((*peer).to_string())
|
||||
} else {
|
||||
FormatText::Str("-".to_string())
|
||||
};
|
||||
|
Reference in New Issue
Block a user