diff --git a/src/handler.rs b/src/handler.rs index e957d15e..8076d4d4 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -1,8 +1,7 @@ use std::marker::PhantomData; use actix_http::{Error, Response}; -use actix_service::{NewService, Service}; -use actix_utils::Never; +use actix_service::{NewService, Service, Void}; use futures::future::{ok, FutureResult}; use futures::{try_ready, Async, Future, IntoFuture, Poll}; @@ -71,7 +70,7 @@ where { type Request = (T, HttpRequest); type Response = ServiceResponse; - type Error = Never; + type Error = Void; type InitError = (); type Service = HandleService; type Future = FutureResult; @@ -101,7 +100,7 @@ where { type Request = (T, HttpRequest); type Response = ServiceResponse; - type Error = Never; + type Error = Void; type Future = HandleServiceResponse; fn poll_ready(&mut self) -> Poll<(), Self::Error> { @@ -128,7 +127,7 @@ where T::Error: Into, { type Item = ServiceResponse; - type Error = Never; + type Error = Void; fn poll(&mut self) -> Poll { match self.fut.poll() { diff --git a/src/middleware/mod.rs b/src/middleware/mod.rs index a8b4b3c6..8ef316b4 100644 --- a/src/middleware/mod.rs +++ b/src/middleware/mod.rs @@ -47,7 +47,7 @@ where } } -impl NewTransform for MiddlewareFactory +impl NewTransform for MiddlewareFactory where T: Transform + Clone, S: Service, @@ -59,7 +59,7 @@ where type InitError = (); type Future = FutureResult; - fn new_transform(&self) -> Self::Future { + fn new_transform(&self, _: &C) -> Self::Future { ok(self.tr.clone()) } }