Skip to content

Commit

Permalink
spawn!(async {}) works in newest nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorBreakfast committed Aug 2, 2018
1 parent e543b0f commit 674f9a2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions futures-util/src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,10 @@ pub trait FutureExt: Future {
/// assert_ne!(thread::current().name(), Some("my-pool-0"));
///
/// // Spawned task runs on the executor specified via `with_executor`
/// let future = async {
/// spawn!(async {
/// assert_eq!(thread::current().name(), Some("my-pool-0"));
/// # tx.send("ran").unwrap();
/// };
/// spawn!(future).unwrap();
/// }).unwrap();
/// }).with_executor(pool));
///
/// # assert_eq!(await!(rx), Ok("ran"))
Expand Down

0 comments on commit 674f9a2

Please sign in to comment.