mirror of
https://github.com/fluencelabs/wasm-timer
synced 2025-03-15 00:00:49 +00:00
Fix compilation
This commit is contained in:
parent
8964804eff
commit
366b800318
@ -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"
|
||||
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user