Fix compilation

This commit is contained in:
Pierre Krieger 2019-08-29 10:04:41 +02:00
parent 8964804eff
commit 366b800318
No known key found for this signature in database
GPG Key ID: EE749C4F41D4EA47
3 changed files with 6 additions and 7 deletions

View File

@ -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 <pierre.krieger1708@gmail.com>"]
license = "MIT"
repository = "https://github.com/tomaka/wasm-timer"

View File

@ -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 }
}
}

View File

@ -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);