Skip to content

Commit 366b800

Browse files
committed
Fix compilation
1 parent 8964804 commit 366b800

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
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.0"
5+
version = "0.2.1"
66
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
77
license = "MIT"
88
repository = "https://github.com/tomaka/wasm-timer"

src/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl TimerHandle {
531531
}
532532

533533
unsafe fn from_usize(val: usize) -> TimerHandle {
534-
let inner = mem::transmute::<usize, Weak<Inner>>(val);;
534+
let inner = mem::transmute::<usize, Weak<Inner>>(val);
535535
TimerHandle { inner }
536536
}
537537
}

src/timer/ext.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,17 @@ where
167167
unsafe_pinned!(stream: S);
168168
}
169169

170-
impl<S> TryStream for TimeoutStream<S>
170+
impl<S> Stream for TimeoutStream<S>
171171
where
172172
S: TryStream,
173173
S::Error: From<io::Error>,
174174
{
175-
type Ok = S::Ok;
176-
type Error = S::Error;
175+
type Item = Result<S::Ok, S::Error>;
177176

178-
fn try_poll_next(
177+
fn poll_next(
179178
mut self: Pin<&mut Self>,
180179
cx: &mut Context<'_>,
181-
) -> Poll<Option<Result<Self::Ok, Self::Error>>> {
180+
) -> Poll<Option<Self::Item>> {
182181
let dur = self.dur;
183182

184183
let r = self.as_mut().stream().try_poll_next(cx);

0 commit comments

Comments
 (0)