diff --git a/actix-server/src/service_config.rs b/actix-server/src/service_config.rs index faa50de3..ed1713b1 100644 --- a/actix-server/src/service_config.rs +++ b/actix-server/src/service_config.rs @@ -173,7 +173,7 @@ impl ServiceRuntime { pub fn service(&mut self, name: &str, service: F) where F: IntoNewService, - T: NewService, Response = ()> + 'static, + T: NewService> + 'static, T::Future: 'static, T::Service: 'static, T::InitError: fmt::Debug, @@ -183,7 +183,7 @@ impl ServiceRuntime { self.services.insert( token.clone(), Box::new(ServiceFactory { - inner: service.into_new_service(), + inner: service.into_new_service().map(|_| ()), }), ); } else {