Skip to content

Commit

Permalink
Update ArcWaker::into_waker() call
Browse files Browse the repository at this point in the history
Syntax of cuntion has been changed
See rust-lang/futures-rs#1676
  • Loading branch information
jakmeier committed Aug 13, 2019
1 parent 76e4f75 commit a958630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webcore/executor.rs
Expand Up @@ -8,7 +8,7 @@
use futures_core::future::{FutureObj, LocalFutureObj};
use futures_executor::enter;
use futures_core::task::{Spawn, SpawnError};
use futures_util::task::ArcWake;
use futures_util::task::{self, ArcWake};
use std::future::Future;
use std::task::{Poll, Context};
use std::pin::Pin;
Expand Down Expand Up @@ -71,7 +71,7 @@ impl Task {

let poll = {
// TODO is there some way of saving these so they don't need to be recreated all the time ?
let waker = ArcWake::into_waker( arc.clone() );
let waker = task::waker( arc.clone() );
let cx = &mut Context::from_waker( &waker );

// TODO what if poll panics ?
Expand Down

0 comments on commit a958630

Please sign in to comment.