Skip to content

Commit

Permalink
Re-export pin_mut! macro for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored and cramertj committed Jun 26, 2019
1 parent 744ece9 commit d9ced4e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion futures-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion futures-channel/tests/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion futures-executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion futures-executor/src/local_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 3 additions & 0 deletions futures-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 1 addition & 0 deletions futures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
3 changes: 1 addition & 2 deletions futures/tests/async_await_macros.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down

0 comments on commit d9ced4e

Please sign in to comment.