diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 65df4f6..b95e762 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -45,10 +45,10 @@ pub trait Service { type Future; } -pub trait MakeService { +pub trait MakeService { type Response; type Error; - type Service: Service; + type Service: Service<(), Error = Self::Error>; type Future; } @@ -74,14 +74,14 @@ impl Service for Balance { pub struct PoolDiscoverer where - MS: MakeService, + MS: MakeService, { _p: PhantomData<(MS, Request)>, } impl Stream for PoolDiscoverer where - MS: MakeService, + MS: MakeService, { type Item = (usize, SvcWrap); } @@ -91,7 +91,7 @@ pub struct Builder {} impl Builder { pub fn build() where - MS: MakeService, + MS: MakeService, MS::Error: Into, { let d: PoolDiscoverer = todo!(); @@ -107,7 +107,7 @@ pub struct Pool { impl Service for Pool where - MS: MakeService, + MS: MakeService, MS::Error: Into, { type Error = , Req> as Service>::Error;