diff --git a/src/client/pool.rs b/src/client/pool.rs index 2082550..434123b 100644 --- a/src/client/pool.rs +++ b/src/client/pool.rs @@ -19,7 +19,7 @@ use tokio::time::{Duration, Instant, Interval}; use futures_channel::oneshot; use tracing::{debug, trace}; -use crate::common::{exec::Exec, ready}; +use crate::common::exec::Exec; // FIXME: allow() required due to `impl Trait` leaking types to this lint #[allow(missing_debug_implementations)] @@ -689,7 +689,7 @@ impl Future for Checkout { type Output = Result, Error>; fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll { - if let Some(pooled) = ready!(self.poll_waiter(cx)?) { + if let Some(pooled) = futures_util::ready!(self.poll_waiter(cx)?) { return Poll::Ready(Ok(pooled)); } @@ -791,7 +791,7 @@ impl Future for IdleTask { } } - ready!(this.interval.as_mut().poll_tick(cx)); + futures_util::ready!(this.interval.as_mut().poll_tick(cx)); if let Some(inner) = this.pool.upgrade() { if let Ok(mut inner) = inner.lock() { diff --git a/src/common/mod.rs b/src/common/mod.rs index 6eeabaf..faf2162 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -1,15 +1,5 @@ #![allow(missing_docs)] -macro_rules! ready { - ($e:expr) => { - match $e { - std::task::Poll::Ready(v) => v, - std::task::Poll::Pending => return std::task::Poll::Pending, - } - }; -} - -pub(crate) use ready; pub mod exec; #[cfg(feature = "client")] mod lazy;