chore: use ready macro from futures-core (#1300)

This commit is contained in:
Gurwinder Singh
2019-07-15 10:43:54 -07:00
committed by Carl Lerche
parent ca708d6d87
commit 83273b8b50
48 changed files with 42 additions and 137 deletions
+1
View File
@@ -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;
-9
View File
@@ -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
View File
@@ -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
View File
@@ -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;