diff --git a/tower-batch/src/future.rs b/tower-batch/src/future.rs index a460bbc5..1a5bd30e 100644 --- a/tower-batch/src/future.rs +++ b/tower-batch/src/future.rs @@ -13,19 +13,19 @@ use tower::Service; /// Future that completes when the batch processing is complete. #[pin_project] -pub struct ResponseFuture +pub struct ResponseFuture where - T: Service>, + S: Service>, { #[pin] - state: ResponseState, + state: ResponseState, } -impl Debug for ResponseFuture +impl Debug for ResponseFuture where - T: Service>, - T::Future: Debug, - T::Error: Debug, + S: Service>, + S::Future: Debug, + S::Error: Debug, E: Debug, { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -36,20 +36,20 @@ where } #[pin_project(project = ResponseStateProj)] -enum ResponseState +enum ResponseState where - T: Service>, + S: Service>, { Failed(Option), - Rx(#[pin] message::Rx), - Poll(#[pin] T::Future), + Rx(#[pin] message::Rx), + Poll(#[pin] S::Future), } -impl Debug for ResponseState +impl Debug for ResponseState where - T: Service>, - T::Future: Debug, - T::Error: Debug, + S: Service>, + S::Future: Debug, + S::Error: Debug, E: Debug, { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -61,11 +61,11 @@ where } } -impl ResponseFuture +impl ResponseFuture where - T: Service>, + S: Service>, { - pub(crate) fn new(rx: message::Rx) -> Self { + pub(crate) fn new(rx: message::Rx) -> Self { ResponseFuture { state: ResponseState::Rx(rx), } @@ -78,9 +78,9 @@ where } } -impl Future for ResponseFuture +impl Future for ResponseFuture where - S: Service>, + S: Service>, S::Future: Future>, S::Error: Into, crate::error::Closed: Into,