Skip to content

Commit

Permalink
Use pin macros from pin_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Aug 6, 2018
1 parent b34fcbb commit 2363782
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions futures-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ name = "futures_test"
futures-core-preview = { version = "0.3.0-alpha.2", path = "../futures-core", default-features = false }
futures-util-preview = { version = "0.3.0-alpha.2", path = "../futures-util", default-features = false }
futures-executor-preview = { version = "0.3.0-alpha.2", path = "../futures-executor", default-features = false }
pin-utils = { version = "0.1.0-alpha.1", default-features = false }

[dev-dependencies]
futures-preview = { version = "0.3.0-alpha.2", path = "../futures", default-features = false, features = ["std"] }
6 changes: 3 additions & 3 deletions futures-test/src/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn assert_is_unpin_stream<S: Stream + Unpin>(_: &mut S) {}
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
/// #[macro_use] extern crate futures_test;
///
/// use futures::stream;
Expand Down Expand Up @@ -50,7 +50,7 @@ macro_rules! assert_stream_pending {
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
/// #[macro_use] extern crate futures_test;
///
/// use futures::stream;
Expand Down Expand Up @@ -93,7 +93,7 @@ macro_rules! assert_stream_next {
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
/// #[macro_use] extern crate futures_test;
///
/// use futures::stream;
Expand Down
2 changes: 1 addition & 1 deletion futures-test/src/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub trait FutureTestExt: Future {
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
///
/// use futures::task::Poll;
/// use futures::future::FutureExt;
Expand Down
2 changes: 1 addition & 1 deletion futures-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub use std as std_reexport;
pub extern crate futures_core as futures_core_reexport;

#[macro_use]
extern crate futures_util;
extern crate pin_utils;

#[macro_use]
#[doc(hidden)]
Expand Down
14 changes: 5 additions & 9 deletions futures-test/src/task/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ use std::sync::Arc;
///
/// ```
/// #![feature(async_await, await_macro, futures_api, pin)]
/// #[macro_use] extern crate pin_utils;
///
/// #[macro_use]
/// extern crate futures;
///
/// # fn main() {
/// use futures::channel::oneshot;
/// use futures::future::Future;
/// use futures::task::Poll;
Expand Down Expand Up @@ -43,7 +40,6 @@ use std::sync::Arc;
/// assert_eq!(res, Poll::Ready(()));
///
/// assert_eq!(rx2.try_recv(), Ok(Some(5)));
/// # }
/// ```
#[derive(Debug)]
pub struct TestContext<W = wake::Panic, E = executor::Panic>
Expand Down Expand Up @@ -139,7 +135,7 @@ where
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
///
/// use futures::future::Future;
/// use futures::task::Poll;
Expand Down Expand Up @@ -170,7 +166,7 @@ where
///
/// ```should_panic
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
///
/// use futures_test::task;
///
Expand All @@ -194,7 +190,7 @@ where
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
///
/// use futures::future::Future;
/// use futures::task::Poll;
Expand Down Expand Up @@ -225,7 +221,7 @@ where
///
/// ```
/// #![feature(async_await, futures_api, pin)]
/// #[macro_use] extern crate futures;
/// #[macro_use] extern crate pin_utils;
///
/// use futures::future::Future;
/// use futures::task::Poll;
Expand Down

0 comments on commit 2363782

Please sign in to comment.