mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -1,5 +1,6 @@
|
||||
use super::TcpListener;
|
||||
use super::TcpStream;
|
||||
use futures_core::ready;
|
||||
use futures_core::stream::Stream;
|
||||
use std::io;
|
||||
use std::pin::Pin;
|
||||
|
||||
@@ -23,15 +23,6 @@
|
||||
//! [incoming_method]: struct.TcpListener.html#method.incoming
|
||||
//! [`Incoming`]: struct.Incoming.html
|
||||
|
||||
macro_rules! ready {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
::std::task::Poll::Ready(t) => t,
|
||||
::std::task::Poll::Pending => return ::std::task::Poll::Pending,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(feature = "incoming")]
|
||||
mod incoming;
|
||||
mod listener;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#[cfg(feature = "incoming")]
|
||||
use super::incoming::Incoming;
|
||||
use super::TcpStream;
|
||||
use futures_core::ready;
|
||||
use mio;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::split::{split, TcpStreamReadHalf, TcpStreamWriteHalf};
|
||||
use bytes::{Buf, BufMut};
|
||||
use futures_core::ready;
|
||||
use iovec::IoVec;
|
||||
use mio;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
Reference in New Issue
Block a user