Migrate threadpool to futures-util (#1403)

* Migrate threadpool to futures-util

Signed-off-by: Lucio Franco <[email protected]>

* fmt
This commit is contained in:
Lucio Franco
2019-08-07 16:26:44 -04:00
committed by GitHub
parent 6412389bba
commit 7268b0bb3a
10 changed files with 14 additions and 15 deletions
+1 -2
View File
@@ -10,6 +10,7 @@ use crate::wheel::{self, Wheel};
use crate::{Delay, Error};
use futures_core::ready;
use futures_util::future::poll_fn;
use slab::Slab;
use std::cmp;
use std::future::Future;
@@ -373,8 +374,6 @@ impl<T> DelayQueue<T> {
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
#[allow(clippy::should_implement_trait)] // false positive : https://github.com/rust-lang/rust-clippy/issues/4290
pub async fn next(&mut self) -> Option<Result<Expired<T>, Error>> {
use async_util::future::poll_fn;
poll_fn(|cx| self.poll_next(cx)).await
}