Skip to content

Commit

Permalink
Use $crate::core_reexport::future::Future rather than reexporting
Browse files Browse the repository at this point in the history
separately
  • Loading branch information
cramertj committed Aug 2, 2018
1 parent 4e29963 commit 393f733
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions futures-util/src/async_await/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ macro_rules! join {
await!($crate::future::poll_fn(move |cx| {
let mut all_done = true;
$(
if $crate::future::Future::poll($fut.reborrow(), cx).is_pending() {
if $crate::core_reexport::future::Future::poll($fut.reborrow(), cx).is_pending() {
all_done = false;
}
)*
Expand Down Expand Up @@ -96,7 +96,7 @@ macro_rules! try_join {
let res: $crate::core_reexport::result::Result<_, _> = await!($crate::future::poll_fn(move |cx| {
let mut all_done = true;
$(
if $crate::future::Future::poll($fut.reborrow(), cx).is_pending() {
if $crate::core_reexport::future::Future::poll($fut.reborrow(), cx).is_pending() {
all_done = false;
} else if $fut.reborrow().output_mut().unwrap().is_err() {
// `.err().unwrap()` rather than `.unwrap_err()` so that we don't introduce
Expand All @@ -111,10 +111,11 @@ macro_rules! try_join {
if all_done {
$crate::core_reexport::task::Poll::Ready(
$crate::core_reexport::result::Result::Ok(($(
// `.ok().unwrap()` rather than `.unwrap()` so that we don't introduce
// an `E: Debug` bound.
$fut.reborrow().take_output().unwrap().ok().unwrap(),
)*)))
// `.ok().unwrap()` rather than `.unwrap()` so that we don't introduce
// an `E: Debug` bound.
$fut.reborrow().take_output().unwrap().ok().unwrap(),
)*))
)
} else {
$crate::core_reexport::task::Poll::Pending
}
Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/async_await/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ macro_rules! select {

let __priv_res = await!($crate::future::poll_fn(|cx| {
$(
match $crate::future::Future::poll(
match $crate::core_reexport::future::Future::poll(
$crate::core_reexport::mem::PinMut::new(&mut $name), cx)
{
$crate::core_reexport::task::Poll::Ready(x) =>
Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use core::marker::Unpin;
use core::mem::PinMut;
pub use futures_core::future::Future;
use futures_core::future::Future;
use futures_core::stream::Stream;
use futures_core::task::{self, Poll, Executor};

Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/sink/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::marker::Unpin;
use either::Either;
use futures_core::future::Future;
use futures_core::stream::Stream;
pub use futures_sink::Sink;
use futures_sink::Sink;

mod close;
pub use self::close::Close;
Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::marker::Unpin;
use core::mem::PinMut;
use either::Either;
use futures_core::future::Future;
pub use futures_core::stream::Stream;
use futures_core::stream::Stream;
use futures_core::task::{self, Poll};
use futures_sink::Sink;

Expand Down

0 comments on commit 393f733

Please sign in to comment.