Skip to content

Commit

Permalink
Always inline sleep.
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed Jul 19, 2022
1 parent 68fcea7 commit 2968aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/yew/src/platform/rt_tokio/time.rs
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use futures::stream::{Stream, StreamExt};
use tokio_stream::wrappers::IntervalStream;

#[inline]
#[inline(always)]
pub(crate) fn sleep(dur: Duration) -> impl Future<Output = ()> {
tokio::time::sleep(dur)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/platform/rt_wasm_bindgen/time.rs
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use futures::stream::Stream;
use wasm_bindgen::UnwrapThrowExt;

#[inline]
#[inline(always)]
pub(crate) fn sleep(dur: Duration) -> impl Future<Output = ()> {
gloo::timers::future::sleep(dur)
}
Expand Down

0 comments on commit 2968aec

Please sign in to comment.