From 29d76d25b50ccc1eb3cf773af3ccade1a97fec10 Mon Sep 17 00:00:00 2001 From: tottoto Date: Fri, 15 Sep 2023 20:51:10 +0900 Subject: [PATCH] chore: use futures_util::ready --- src/client/legacy/pool.rs | 3 ++- src/common/mod.rs | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/client/legacy/pool.rs b/src/client/legacy/pool.rs index 03b431f..8011ed5 100644 --- a/src/client/legacy/pool.rs +++ b/src/client/legacy/pool.rs @@ -15,9 +15,10 @@ use std::task::{self, Poll}; use std::time::{Duration, Instant}; use futures_channel::oneshot; +use futures_util::ready; use tracing::{debug, trace}; -use crate::common::{exec, exec::Exec, ready}; +use crate::common::exec::{self, 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 160df72..f14b6c4 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(crate) mod exec; #[cfg(feature = "client")] mod lazy;