mirror of
https://github.com/fluencelabs/wasm-timer
synced 2025-03-15 16:20:49 +00:00
Fix compilation
This commit is contained in:
parent
8964804eff
commit
366b800318
@ -2,7 +2,7 @@
|
|||||||
name = "wasm-timer"
|
name = "wasm-timer"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Abstraction over std::time::Instant and futures-timer that works on WASM"
|
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>"]
|
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/tomaka/wasm-timer"
|
repository = "https://github.com/tomaka/wasm-timer"
|
||||||
|
@ -531,7 +531,7 @@ impl TimerHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn from_usize(val: usize) -> 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 }
|
TimerHandle { inner }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,18 +167,17 @@ where
|
|||||||
unsafe_pinned!(stream: S);
|
unsafe_pinned!(stream: S);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> TryStream for TimeoutStream<S>
|
impl<S> Stream for TimeoutStream<S>
|
||||||
where
|
where
|
||||||
S: TryStream,
|
S: TryStream,
|
||||||
S::Error: From<io::Error>,
|
S::Error: From<io::Error>,
|
||||||
{
|
{
|
||||||
type Ok = S::Ok;
|
type Item = Result<S::Ok, S::Error>;
|
||||||
type Error = S::Error;
|
|
||||||
|
|
||||||
fn try_poll_next(
|
fn poll_next(
|
||||||
mut self: Pin<&mut Self>,
|
mut self: Pin<&mut Self>,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
) -> Poll<Option<Result<Self::Ok, Self::Error>>> {
|
) -> Poll<Option<Self::Item>> {
|
||||||
let dur = self.dur;
|
let dur = self.dur;
|
||||||
|
|
||||||
let r = self.as_mut().stream().try_poll_next(cx);
|
let r = self.as_mut().stream().try_poll_next(cx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user