1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 23:56:35 +00:00

explicitly use unit for server service error

This commit is contained in:
Nikolay Kim 2018-09-07 14:49:17 -07:00
parent 0fdce01375
commit 4e186cc6d2
2 changed files with 5 additions and 5 deletions

View file

@ -147,7 +147,7 @@ impl Server {
where
F: Fn() -> N + Clone + Send + 'static,
U: net::ToSocketAddrs,
N: NewService<Request = TcpStream, Response = (), InitError = ()> + 'static,
N: NewService<Request = TcpStream, Response = (), Error = (), InitError = ()> + 'static,
N::Service: 'static,
N::Future: 'static,
{
@ -163,7 +163,7 @@ impl Server {
pub fn listen<F, N>(mut self, lst: net::TcpListener, factory: F) -> Self
where
F: Fn() -> N + Clone + Send + 'static,
N: NewService<Request = TcpStream, Response = (), InitError = ()> + 'static,
N: NewService<Request = TcpStream, Response = (), Error = (), InitError = ()> + 'static,
N::Service: 'static,
N::Future: 'static,
{

View file

@ -62,7 +62,7 @@ impl<T> ServerService<T> {
impl<T> Service for ServerService<T>
where
T: Service<Request = TcpStream, Response = ()>,
T: Service<Request = TcpStream, Response = (), Error = ()>,
T::Future: 'static,
T::Error: 'static,
{
@ -114,7 +114,7 @@ where
impl<F, T> ServerNewService<F, T>
where
F: Fn() -> T + Send + Clone + 'static,
T: NewService<Request = TcpStream, Response = (), InitError = ()> + 'static,
T: NewService<Request = TcpStream, Response = (), Error = (), InitError = ()> + 'static,
T::Service: 'static,
T::Future: 'static,
{
@ -132,7 +132,7 @@ pub trait ServerServiceFactory {
impl<F, T> ServerServiceFactory for ServerNewService<F, T>
where
F: Fn() -> T + Send + Clone + 'static,
T: NewService<Request = TcpStream, Response = (), InitError = ()> + 'static,
T: NewService<Request = TcpStream, Response = (), Error = (), InitError = ()> + 'static,
T::Service: 'static,
T::Future: 'static,
{