mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -21,19 +21,6 @@ macro_rules! debug {
|
||||
}
|
||||
}
|
||||
|
||||
/// Unwrap a ready value or propagate `Poll::Pending`.
|
||||
#[macro_export]
|
||||
macro_rules! ready {
|
||||
($e:expr) => {{
|
||||
use std::task::Poll::{Pending, Ready};
|
||||
|
||||
match $e {
|
||||
Ready(v) => v,
|
||||
Pending => return Pending,
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
macro_rules! if_fuzz {
|
||||
($($t:tt)*) => {{
|
||||
if false { $($t)* }
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
use crate::semaphore;
|
||||
|
||||
use futures_core::ready;
|
||||
use std::cell::UnsafeCell;
|
||||
use std::fmt;
|
||||
use std::future::Future;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use crate::loom::{sync::atomic::AtomicUsize, sync::CausalCell};
|
||||
|
||||
use futures_core::ready;
|
||||
use std::fmt;
|
||||
use std::future::Future;
|
||||
use std::mem::{self, ManuallyDrop};
|
||||
|
||||
@@ -58,6 +58,7 @@ use crate::task::AtomicWaker;
|
||||
use core::task::Poll::{Pending, Ready};
|
||||
use core::task::{Context, Poll};
|
||||
use fnv::FnvHashMap;
|
||||
use futures_core::ready;
|
||||
use std::ops;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use std::sync::atomic::Ordering::SeqCst;
|
||||
|
||||
Reference in New Issue
Block a user