mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-06 00:00:10 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -12,15 +12,6 @@
|
||||
//! Reading and writing to it can be done using futures, which return the
|
||||
//! [`Recv`], [`Send`], [`RecvFrom`] and [`SendTo`] structs respectively.
|
||||
|
||||
macro_rules! ready {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
::std::task::Poll::Ready(t) => t,
|
||||
::std::task::Poll::Pending => return ::std::task::Poll::Pending,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// mod frame;
|
||||
mod recv;
|
||||
mod recv_from;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use super::split::{split, UdpSocketRecvHalf, UdpSocketSendHalf};
|
||||
use super::{Recv, RecvFrom, Send, SendTo};
|
||||
use futures_core::ready;
|
||||
use mio;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
|
||||
Reference in New Issue
Block a user