From 4e186cc6d2003467fbf638a2fad7452b0872d0dd Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 7 Sep 2018 14:49:17 -0700 Subject: [PATCH] explicitly use unit for server service error --- src/server.rs | 4 ++-- src/server_service.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server.rs b/src/server.rs index 43e67a689..0e9774596 100644 --- a/src/server.rs +++ b/src/server.rs @@ -147,7 +147,7 @@ impl Server { where F: Fn() -> N + Clone + Send + 'static, U: net::ToSocketAddrs, - N: NewService + 'static, + N: NewService + 'static, N::Service: 'static, N::Future: 'static, { @@ -163,7 +163,7 @@ impl Server { pub fn listen(mut self, lst: net::TcpListener, factory: F) -> Self where F: Fn() -> N + Clone + Send + 'static, - N: NewService + 'static, + N: NewService + 'static, N::Service: 'static, N::Future: 'static, { diff --git a/src/server_service.rs b/src/server_service.rs index d597c5c08..a7272c6f5 100644 --- a/src/server_service.rs +++ b/src/server_service.rs @@ -62,7 +62,7 @@ impl ServerService { impl Service for ServerService where - T: Service, + T: Service, T::Future: 'static, T::Error: 'static, { @@ -114,7 +114,7 @@ where impl ServerNewService where F: Fn() -> T + Send + Clone + 'static, - T: NewService + 'static, + T: NewService + 'static, T::Service: 'static, T::Future: 'static, { @@ -132,7 +132,7 @@ pub trait ServerServiceFactory { impl ServerServiceFactory for ServerNewService where F: Fn() -> T + Send + Clone + 'static, - T: NewService + 'static, + T: NewService + 'static, T::Service: 'static, T::Future: 'static, {