From 4b535d4ada98cde732a76d14f55c9c1882c1f1e5 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Fri, 30 Aug 2019 21:27:53 +0200 Subject: [PATCH 1/4] expose future::ready! Signed-off-by: Yoshua Wuyts --- src/future/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/future/mod.rs b/src/future/mod.rs index 7d88b90..67554f9 100644 --- a/src/future/mod.rs +++ b/src/future/mod.rs @@ -5,6 +5,10 @@ pub use std::future::Future; use cfg_if::cfg_if; +// Re-export the `ready!` definition from an external crate to expose it from +// this submodule. +pub use futures::ready; + pub use pending::pending; pub use poll_fn::poll_fn; pub use ready::ready; From 1ad339a19eac5ffce133e34115a6993e9e7fca29 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 10 Sep 2019 14:10:42 +0200 Subject: [PATCH 2/4] rebase on master Signed-off-by: Yoshua Wuyts --- src/future/mod.rs | 4 ---- src/task/mod.rs | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/future/mod.rs b/src/future/mod.rs index 67554f9..7d88b90 100644 --- a/src/future/mod.rs +++ b/src/future/mod.rs @@ -5,10 +5,6 @@ pub use std::future::Future; use cfg_if::cfg_if; -// Re-export the `ready!` definition from an external crate to expose it from -// this submodule. -pub use futures::ready; - pub use pending::pending; pub use poll_fn::poll_fn; pub use ready::ready; diff --git a/src/task/mod.rs b/src/task/mod.rs index eef7284..faab696 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -25,6 +25,10 @@ pub use std::task::{Context, Poll, Waker}; pub use block_on::block_on; +// Re-export the `ready!` definition from an external crate to expose it from +// this submodule. +pub use futures_core::ready; + pub use local::{AccessError, LocalKey}; pub use pool::{current, spawn, Builder}; pub use sleep::sleep; From d5725e78bea5ac9c1828ce30f185c7ebe96af2a4 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 17 Sep 2019 23:24:15 +0200 Subject: [PATCH 3/4] use async-macros Signed-off-by: Yoshua Wuyts --- Cargo.toml | 1 + src/task/mod.rs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 907c1eb..133eadc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,7 @@ docs = [] unstable = [] [dependencies] +async-macros = "1.0.0" async-task = "1.0.0" cfg-if = "0.1.9" crossbeam-channel = "0.3.9" diff --git a/src/task/mod.rs b/src/task/mod.rs index faab696..56c0113 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -24,11 +24,10 @@ #[doc(inline)] pub use std::task::{Context, Poll, Waker}; -pub use block_on::block_on; -// Re-export the `ready!` definition from an external crate to expose it from -// this submodule. -pub use futures_core::ready; +#[doc(inline)] +pub use async_macros::ready; +pub use block_on::block_on; pub use local::{AccessError, LocalKey}; pub use pool::{current, spawn, Builder}; pub use sleep::sleep; From d0312a028cfd424ef3d65eb1f0563a58e32e71e4 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 17 Sep 2019 23:32:38 +0200 Subject: [PATCH 4/4] mark task::ready as unstable Signed-off-by: Yoshua Wuyts --- src/task/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/task/mod.rs b/src/task/mod.rs index 56c0113..32b1884 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -24,6 +24,8 @@ #[doc(inline)] pub use std::task::{Context, Poll, Waker}; +#[cfg(feature = "unstable")] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[doc(inline)] pub use async_macros::ready;