mirror of
https://github.com/actix/actix-web.git
synced 2025-01-03 05:48:45 +00:00
explicitly use unit for server service error
This commit is contained in:
parent
0fdce01375
commit
4e186cc6d2
2 changed files with 5 additions and 5 deletions
|
@ -147,7 +147,7 @@ impl Server {
|
||||||
where
|
where
|
||||||
F: Fn() -> N + Clone + Send + 'static,
|
F: Fn() -> N + Clone + Send + 'static,
|
||||||
U: net::ToSocketAddrs,
|
U: net::ToSocketAddrs,
|
||||||
N: NewService<Request = TcpStream, Response = (), InitError = ()> + 'static,
|
N: NewService<Request = TcpStream, Response = (), Error = (), InitError = ()> + 'static,
|
||||||
N::Service: 'static,
|
N::Service: 'static,
|
||||||
N::Future: 'static,
|
N::Future: 'static,
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@ impl Server {
|
||||||
pub fn listen<F, N>(mut self, lst: net::TcpListener, factory: F) -> Self
|
pub fn listen<F, N>(mut self, lst: net::TcpListener, factory: F) -> Self
|
||||||
where
|
where
|
||||||
F: Fn() -> N + Clone + Send + 'static,
|
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::Service: 'static,
|
||||||
N::Future: 'static,
|
N::Future: 'static,
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,7 +62,7 @@ impl<T> ServerService<T> {
|
||||||
|
|
||||||
impl<T> Service for ServerService<T>
|
impl<T> Service for ServerService<T>
|
||||||
where
|
where
|
||||||
T: Service<Request = TcpStream, Response = ()>,
|
T: Service<Request = TcpStream, Response = (), Error = ()>,
|
||||||
T::Future: 'static,
|
T::Future: 'static,
|
||||||
T::Error: 'static,
|
T::Error: 'static,
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ where
|
||||||
impl<F, T> ServerNewService<F, T>
|
impl<F, T> ServerNewService<F, T>
|
||||||
where
|
where
|
||||||
F: Fn() -> T + Send + Clone + 'static,
|
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::Service: 'static,
|
||||||
T::Future: 'static,
|
T::Future: 'static,
|
||||||
{
|
{
|
||||||
|
@ -132,7 +132,7 @@ pub trait ServerServiceFactory {
|
||||||
impl<F, T> ServerServiceFactory for ServerNewService<F, T>
|
impl<F, T> ServerServiceFactory for ServerNewService<F, T>
|
||||||
where
|
where
|
||||||
F: Fn() -> T + Send + Clone + 'static,
|
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::Service: 'static,
|
||||||
T::Future: 'static,
|
T::Future: 'static,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue