From f3bd42191f6daf794cfda227d01d37ce45e24801 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Thu, 15 Sep 2022 21:57:44 +0200 Subject: [PATCH] a --- tower/tower/src/balance.rs | 8 +++----- tower/tower/src/lib.rs | 4 ++-- tower/tower/src/make.rs | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tower/tower/src/balance.rs b/tower/tower/src/balance.rs index 467236a..9774425 100644 --- a/tower/tower/src/balance.rs +++ b/tower/tower/src/balance.rs @@ -42,7 +42,7 @@ where fn(>::Error) -> crate::BoxError, >; - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + fn poll_ready(&mut self) -> Poll> { todo!() } @@ -107,7 +107,7 @@ where type Error = , Req> as Service>::Error; type Future = , Req> as Service>::Future; - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + fn poll_ready(&mut self) -> Poll> { todo!() } @@ -118,8 +118,6 @@ where pub struct DropNotifyService { svc: Svc, - id: usize, - notify: tokio::sync::mpsc::UnboundedSender, } impl Drop for DropNotifyService { @@ -140,7 +138,7 @@ impl> Service for DropNotifyService type Future = Svc::Future; type Error = Svc::Error; - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + fn poll_ready(&mut self) -> Poll> { todo!() } diff --git a/tower/tower/src/lib.rs b/tower/tower/src/lib.rs index 21093a4..b08f550 100644 --- a/tower/tower/src/lib.rs +++ b/tower/tower/src/lib.rs @@ -17,7 +17,7 @@ mod load { } use std::future::Future; -use std::task::{Context, Poll}; +use std::task::Poll; pub trait Service { /// Responses given by the service. @@ -29,7 +29,7 @@ pub trait Service { /// The future response value. type Future: Future>; - fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll>; + fn poll_ready(&mut self) -> Poll>; fn call(&mut self, req: Request) -> Self::Future; } diff --git a/tower/tower/src/make.rs b/tower/tower/src/make.rs index d1309f0..73b6af4 100644 --- a/tower/tower/src/make.rs +++ b/tower/tower/src/make.rs @@ -18,7 +18,7 @@ where type Error = Infallible; type Future = SharedFuture; - fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { + fn poll_ready(&mut self) -> Poll> { todo!() } @@ -40,7 +40,7 @@ where fn poll( self: std::pin::Pin<&mut Self>, - cx: &mut std::task::Context<'_>, + _: &mut std::task::Context<'_>, ) -> std::task::Poll { todo!() } @@ -75,7 +75,7 @@ where type Future = M::Future; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { - Service::poll_ready(self, cx) + Service::poll_ready(self) } fn make_service(&mut self, target: Target) -> Self::Future {