diff --git a/src/service/from_err.rs b/src/service/from_err.rs
index d0e40c58..c4ee7618 100644
--- a/src/service/from_err.rs
+++ b/src/service/from_err.rs
@@ -89,7 +89,7 @@ pub struct FromErrNewService {
impl FromErrNewService
where
A: NewService,
- E: From + From,
+ E: From,
{
/// Create new `FromErr` new service instance
pub fn new(a: A) -> Self {
@@ -100,7 +100,7 @@ where
impl Clone for FromErrNewService
where
A: NewService + Clone,
- E: From + From,
+ E: From,
{
fn clone(&self) -> Self {
Self {
@@ -113,14 +113,14 @@ where
impl NewService for FromErrNewService
where
A: NewService,
- E: From + From,
+ E: From,
{
type Request = A::Request;
type Response = A::Response;
type Error = E;
type Service = FromErr;
- type InitError = E;
+ type InitError = A::InitError;
type Future = FromErrNewServiceFuture;
fn new_service(&self) -> Self::Future {
@@ -134,7 +134,7 @@ where
pub struct FromErrNewServiceFuture
where
A: NewService,
- E: From + From,
+ E: From,
{
fut: A::Future,
e: PhantomData,
@@ -143,10 +143,10 @@ where
impl Future for FromErrNewServiceFuture
where
A: NewService,
- E: From + From,
+ E: From,
{
type Item = FromErr;
- type Error = E;
+ type Error = A::InitError;
fn poll(&mut self) -> Poll {
if let Async::Ready(service) = self.fut.poll()? {
diff --git a/src/service/mod.rs b/src/service/mod.rs
index dbfb99f8..41441cdb 100644
--- a/src/service/mod.rs
+++ b/src/service/mod.rs
@@ -141,7 +141,7 @@ pub trait NewServiceExt: NewService {
fn from_err(self) -> FromErrNewService
where
Self: Sized,
- E: From + From,
+ E: From,
{
FromErrNewService::new(self)
}