Skip to content

Commit 92b85d9

Browse files
committed
fix build with -default +unstable
Fixes #842 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
1 parent 3f68e94 commit 92b85d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod timer {
6666

6767
#[cfg(any(feature = "unstable", feature = "default"))]
6868
pub(crate) fn timer_after(dur: std::time::Duration) -> timer::Timer {
69-
#[cfg(not(target_os = "unknown"))]
69+
#[cfg(all(not(target_os = "unknown"), feature = "default"))]
7070
once_cell::sync::Lazy::force(&crate::rt::RUNTIME);
7171

7272
Timer::new(dur)
@@ -84,7 +84,7 @@ mod timer {
8484
pub(crate) struct Timer(futures_timer::Delay);
8585

8686
impl Timer {
87-
pub(crate) fn after(dur: std::time::Duration) -> Self {
87+
pub(crate) fn new(dur: std::time::Duration) -> Self {
8888
Timer(futures_timer::Delay::new(dur))
8989
}
9090
}

0 commit comments

Comments
 (0)