diff --git a/futures-channel/Cargo.toml b/futures-channel/Cargo.toml index 7683d8c266..e1e321a52e 100644 --- a/futures-channel/Cargo.toml +++ b/futures-channel/Cargo.toml @@ -24,4 +24,3 @@ futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.16", [dev-dependencies] futures-preview = { path = "../futures", version = "=0.3.0-alpha.16", default-features = true } futures-test-preview = { path = "../futures-test", version = "=0.3.0-alpha.16", default-features = true } -pin-utils = "0.1.0-alpha.4" diff --git a/futures-channel/tests/mpsc.rs b/futures-channel/tests/mpsc.rs index 860e9c8173..df8d3b9f39 100644 --- a/futures-channel/tests/mpsc.rs +++ b/futures-channel/tests/mpsc.rs @@ -6,8 +6,8 @@ use futures::future::{FutureExt, poll_fn}; use futures::stream::{Stream, StreamExt}; use futures::sink::{Sink, SinkExt}; use futures::task::{Context, Poll}; +use futures::pin_mut; use futures_test::task::{new_count_waker, noop_context}; -use pin_utils::pin_mut; use std::sync::{Arc, Mutex}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; diff --git a/futures-executor/Cargo.toml b/futures-executor/Cargo.toml index a0d65f3056..7c79b2c787 100644 --- a/futures-executor/Cargo.toml +++ b/futures-executor/Cargo.toml @@ -23,7 +23,6 @@ futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.16", futures-util-preview = { path = "../futures-util", version = "=0.3.0-alpha.16", default-features = false} futures-channel-preview = { path = "../futures-channel", version = "=0.3.0-alpha.16", default-features = false} num_cpus = { version = "1.8.0", optional = true } -pin-utils = "0.1.0-alpha.4" [dev-dependencies] futures-preview = { path = "../futures", version = "=0.3.0-alpha.16" } diff --git a/futures-executor/src/local_pool.rs b/futures-executor/src/local_pool.rs index 60a2eb63b8..ac5cf23000 100644 --- a/futures-executor/src/local_pool.rs +++ b/futures-executor/src/local_pool.rs @@ -5,7 +5,7 @@ use futures_core::task::{Context, Poll, Spawn, LocalSpawn, SpawnError}; use futures_util::task::{waker_ref, ArcWake}; use futures_util::stream::FuturesUnordered; use futures_util::stream::StreamExt; -use pin_utils::pin_mut; +use futures_util::pin_mut; use std::cell::{RefCell}; use std::ops::{Deref, DerefMut}; use std::rc::{Rc, Weak}; diff --git a/futures-util/src/lib.rs b/futures-util/src/lib.rs index 70e8d6db76..a66e4da323 100644 --- a/futures-util/src/lib.rs +++ b/futures-util/src/lib.rs @@ -30,6 +30,9 @@ extern crate alloc; #[macro_use] mod macros; +// Re-export pin_mut! for convenience +pub use pin_utils::pin_mut; + #[cfg(feature = "async-await")] #[macro_use] #[doc(hidden)] diff --git a/futures/src/lib.rs b/futures/src/lib.rs index 215a596957..2c85f743e8 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -67,6 +67,7 @@ compile_error!("The `never-type` feature requires the `nightly` feature as an ex #[doc(hidden)] pub use futures_core::task::Poll; // Macro reexports +pub use futures_util::pin_mut; pub use futures_util::ready; // Readiness propagation #[cfg(feature = "async-await")] pub use futures_util::{ diff --git a/futures/tests/async_await_macros.rs b/futures/tests/async_await_macros.rs index 78dc86f77e..c7ad0d672b 100644 --- a/futures/tests/async_await_macros.rs +++ b/futures/tests/async_await_macros.rs @@ -1,13 +1,12 @@ #![recursion_limit="128"] #![feature(async_await)] -use futures::{Poll, pending, poll, join, try_join, select}; +use futures::{Poll, pending, pin_mut, poll, join, try_join, select}; use futures::channel::{mpsc, oneshot}; use futures::executor::block_on; use futures::future::{self, FutureExt}; use futures::stream::StreamExt; use futures::sink::SinkExt; -use pin_utils::pin_mut; #[test] fn poll_and_pending() {