diff --git a/actix-files/src/files.rs b/actix-files/src/files.rs index d539c854f..0cf0a91ba 100644 --- a/actix-files/src/files.rs +++ b/actix-files/src/files.rs @@ -129,9 +129,8 @@ impl Files { /// Set custom directory renderer pub fn files_listing_renderer(mut self, f: F) -> Self where - for<'r, 's> F: - Fn(&'r Directory, &'s HttpRequest) -> Result - + 'static, + for<'r, 's> F: Fn(&'r Directory, &'s HttpRequest) -> Result + + 'static, { self.renderer = Rc::new(f); self @@ -205,11 +204,11 @@ impl Files { where F: IntoServiceFactory, U: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + > + 'static, { // create and configure default resource self.default = Rc::new(RefCell::new(Some(Rc::new(boxed::factory( diff --git a/actix-http/src/client/connector.rs b/actix-http/src/client/connector.rs index 3c64cee38..3581ebe75 100644 --- a/actix-http/src/client/connector.rs +++ b/actix-http/src/client/connector.rs @@ -62,10 +62,10 @@ impl Connector<(), ()> { #[allow(clippy::new_ret_no_self, clippy::let_unit_value)] pub fn new() -> Connector< impl Service< - TcpConnect, - Response = TcpConnection, - Error = actix_tls::connect::ConnectError, - > + Clone, + TcpConnect, + Response = TcpConnection, + Error = actix_tls::connect::ConnectError, + > + Clone, TcpStream, > { Connector { @@ -117,10 +117,10 @@ impl Connector { where U1: AsyncRead + AsyncWrite + Unpin + fmt::Debug, T1: Service< - TcpConnect, - Response = TcpConnection, - Error = actix_tls::connect::ConnectError, - > + Clone, + TcpConnect, + Response = TcpConnection, + Error = actix_tls::connect::ConnectError, + > + Clone, { Connector { connector, @@ -135,10 +135,10 @@ impl Connector where U: AsyncRead + AsyncWrite + Unpin + fmt::Debug + 'static, T: Service< - TcpConnect, - Response = TcpConnection, - Error = actix_tls::connect::ConnectError, - > + Clone + TcpConnect, + Response = TcpConnection, + Error = actix_tls::connect::ConnectError, + > + Clone + 'static, { /// Connection timeout, i.e. max time to connect to remote host including dns name resolution. diff --git a/src/app.rs b/src/app.rs index 9e5973290..921831293 100644 --- a/src/app.rs +++ b/src/app.rs @@ -271,11 +271,11 @@ where where F: IntoServiceFactory, U: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + > + 'static, U::InitError: fmt::Debug, { // create and configure default resource diff --git a/src/config.rs b/src/config.rs index a58b98eb8..c3ca6373b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -107,12 +107,12 @@ impl AppService { ) where F: IntoServiceFactory, S: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - InitError = (), - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + > + 'static, { self.services.push(( rdef, diff --git a/src/resource.rs b/src/resource.rs index 04cb94d34..6b9f34fb3 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -350,11 +350,11 @@ where where F: IntoServiceFactory, U: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + > + 'static, U::InitError: fmt::Debug, { // create and configure default resource @@ -369,12 +369,12 @@ where impl HttpServiceFactory for Resource where T: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - InitError = (), - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + > + 'static, { fn register(mut self, config: &mut AppService) { let guards = if self.guards.is_empty() { diff --git a/src/scope.rs b/src/scope.rs index e9b023289..82af73fcb 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -287,11 +287,11 @@ where where F: IntoServiceFactory, U: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + > + 'static, U::InitError: fmt::Debug, { // create and configure default resource @@ -408,12 +408,12 @@ where impl HttpServiceFactory for Scope where T: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - InitError = (), - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + > + 'static, { fn register(mut self, config: &mut AppService) { // update default resource if needed diff --git a/src/service.rs b/src/service.rs index cdbf74cdf..83e9f2ac0 100644 --- a/src/service.rs +++ b/src/service.rs @@ -478,12 +478,12 @@ impl WebService { where F: IntoServiceFactory, T: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - InitError = (), - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + > + 'static, { WebServiceImpl { srv: service.into_factory(), @@ -504,12 +504,12 @@ struct WebServiceImpl { impl HttpServiceFactory for WebServiceImpl where T: ServiceFactory< - ServiceRequest, - Config = (), - Response = ServiceResponse, - Error = Error, - InitError = (), - > + 'static, + ServiceRequest, + Config = (), + Response = ServiceResponse, + Error = Error, + InitError = (), + > + 'static, { fn register(mut self, config: &mut AppService) { let guards = if self.guards.is_empty() {