From d424b911e71a4f60d2d8c6fcda77896272485bc9 Mon Sep 17 00:00:00 2001 From: tottoto Date: Fri, 15 Sep 2023 20:51:10 +0900 Subject: [PATCH] chore: use futures_utill::ready --- src/client/pool.rs | 3 ++- src/common/mod.rs | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/client/pool.rs b/src/client/pool.rs index 2082550..4eb216a 100644 --- a/src/client/pool.rs +++ b/src/client/pool.rs @@ -17,9 +17,10 @@ use std::time::{Duration, Instant}; use tokio::time::{Duration, Instant, Interval}; use futures_channel::oneshot; +use futures_util::ready; 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)] diff --git a/src/common/mod.rs b/src/common/mod.rs index 9ba4244..a198714 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;