diff --git a/tower/src/balance.rs b/tower/src/balance.rs index a74fbae..1c58c0a 100644 --- a/tower/src/balance.rs +++ b/tower/src/balance.rs @@ -1,6 +1,6 @@ use crate::MakeService; use crate::Service; -use crate::{Change, Discover}; +use crate::{Discover}; use futures_core::Stream; use futures_util::future::{self}; use std::hash::Hash; @@ -52,7 +52,7 @@ impl Stream for PoolDiscoverer where MS: MakeService, { - type Item = Result>, MS::Error>; + type Item = Result<(usize, DropNotifyService), MS::Error>; fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { todo!() @@ -86,6 +86,7 @@ impl Service for Pool where MS: MakeService, MS::Error: Into, + Target: Clone, { type Response = , Req> as Service>::Response; type Error = , Req> as Service>::Error; diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 80e4a88..f0f2bc8 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -12,7 +12,7 @@ pub trait Discover { impl Discover for D where - D: TryStream, Error = E>, + D: TryStream, K: Eq, { type Key = K; @@ -20,8 +20,6 @@ where type Error = E; } -pub struct Change(K, V); - pub trait Service { type Response; type Error; @@ -34,3 +32,4 @@ pub trait MakeService { type Service: Service; type Future; } +