diff --git a/src/service/apply.rs b/src/service/apply.rs index 0c29b81c3..d98e77c8b 100644 --- a/src/service/apply.rs +++ b/src/service/apply.rs @@ -7,7 +7,7 @@ use {IntoNewService, NewService, Service}; pub struct Apply { service: T, f: F, - r: PhantomData R>, + r: PhantomData<(Req, R)>, } impl Apply diff --git a/src/service/fn_service.rs b/src/service/fn_service.rs index 07c9df3a8..cf3d6d850 100644 --- a/src/service/fn_service.rs +++ b/src/service/fn_service.rs @@ -14,9 +14,7 @@ where Fut: IntoFuture, { f: F, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData<(Req, Resp, E)>, } impl FnService @@ -27,9 +25,7 @@ where pub fn new(f: F) -> Self { FnService { f, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData, } } } @@ -42,9 +38,7 @@ where fn clone(&self) -> Self { FnService { f: self.f.clone(), - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData, } } } @@ -84,10 +78,7 @@ where Fut: IntoFuture, { f: F, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, - ierr: marker::PhantomData, + _t: marker::PhantomData<(Req, Resp, Err, IErr)>, } impl FnNewService @@ -98,10 +89,7 @@ where pub fn new(f: F) -> Self { FnNewService { f, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, - ierr: marker::PhantomData, + _t: marker::PhantomData, } } } diff --git a/src/service/fn_state_service.rs b/src/service/fn_state_service.rs index 8b44ce448..2366baa25 100644 --- a/src/service/fn_state_service.rs +++ b/src/service/fn_state_service.rs @@ -12,9 +12,7 @@ where { f: F, state: S, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData<(Req, Resp, Err)>, } impl FnStateService @@ -26,9 +24,7 @@ where FnStateService { f, state, - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData, } } } @@ -43,9 +39,7 @@ where FnStateService { f: self.f.clone(), state: self.state.clone(), - req: marker::PhantomData, - resp: marker::PhantomData, - err: marker::PhantomData, + _t: marker::PhantomData, } } } @@ -73,13 +67,7 @@ where pub struct FnStateNewService { f: F1, state: F2, - s: marker::PhantomData, - req: marker::PhantomData, - resp: marker::PhantomData, - err1: marker::PhantomData, - err2: marker::PhantomData, - fut1: marker::PhantomData, - fut2: marker::PhantomData, + _t: marker::PhantomData<(S, Req, Resp, Err1, Err2, Fut1, Fut2)>, } impl @@ -89,13 +77,7 @@ impl FnStateNewService { f, state, - s: marker::PhantomData, - req: marker::PhantomData, - resp: marker::PhantomData, - err1: marker::PhantomData, - err2: marker::PhantomData, - fut1: marker::PhantomData, - fut2: marker::PhantomData, + _t: marker::PhantomData, } } }