Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed Aug 29, 2019
1 parent 8964804 commit 366b800
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "wasm-timer"
edition = "2018"
description = "Abstraction over std::time::Instant and futures-timer that works on WASM"
version = "0.2.0"
version = "0.2.1"
authors = ["Pierre Krieger <[email protected]>"]
license = "MIT"
repository = "https://github.com/tomaka/wasm-timer"
Expand Down
2 changes: 1 addition & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ impl TimerHandle {
}

unsafe fn from_usize(val: usize) -> TimerHandle {
let inner = mem::transmute::<usize, Weak<Inner>>(val);;
let inner = mem::transmute::<usize, Weak<Inner>>(val);
TimerHandle { inner }
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/timer/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,17 @@ where
unsafe_pinned!(stream: S);
}

impl<S> TryStream for TimeoutStream<S>
impl<S> Stream for TimeoutStream<S>
where
S: TryStream,
S::Error: From<io::Error>,
{
type Ok = S::Ok;
type Error = S::Error;
type Item = Result<S::Ok, S::Error>;

fn try_poll_next(
fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>> {
) -> Poll<Option<Self::Item>> {
let dur = self.dur;

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

0 comments on commit 366b800

Please sign in to comment.