Skip to content

Commit ee6f010

Browse files
committed
Fix WASM build
1 parent e0207bd commit ee6f010

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "wasm-timer"
33
edition = "2018"
44
description = "Abstraction over std::time::Instant and futures-timer that works on WASM"
5-
version = "0.2.3"
5+
version = "0.2.4"
66
authors = ["Pierre Krieger <[email protected]>"]
77
license = "MIT"
88
repository = "https://github.com/tomaka/wasm-timer"

src/timer/global/wasm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use futures::task::ArcWake;
1+
use futures::task::{self, ArcWake};
22
use parking_lot::Mutex;
33
use std::convert::TryFrom;
44
use std::future::Future;
@@ -33,7 +33,7 @@ fn schedule_callback(timer: Arc<Mutex<Timer>>, when: Duration) {
3333
// We start by polling the timer. If any new `Delay` is created, the waker will be used
3434
// to wake up this task pre-emptively. As such, we pass a `Waker` that calls
3535
// `schedule_callback` with a delay of `0`.
36-
let waker = Arc::new(Waker { timer: timer.clone() }).into_waker();
36+
let waker = task::waker(Arc::new(Waker { timer: timer.clone() }));
3737
let _ = Future::poll(Pin::new(&mut *timer_lock), &mut Context::from_waker(&waker));
3838

3939
// Notify the timers that are ready.

0 commit comments

Comments
 (0)