We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f68e94 commit 92b85d9Copy full SHA for 92b85d9
src/utils.rs
@@ -66,7 +66,7 @@ mod timer {
66
67
#[cfg(any(feature = "unstable", feature = "default"))]
68
pub(crate) fn timer_after(dur: std::time::Duration) -> timer::Timer {
69
- #[cfg(not(target_os = "unknown"))]
+ #[cfg(all(not(target_os = "unknown"), feature = "default"))]
70
once_cell::sync::Lazy::force(&crate::rt::RUNTIME);
71
72
Timer::new(dur)
@@ -84,7 +84,7 @@ mod timer {
84
pub(crate) struct Timer(futures_timer::Delay);
85
86
impl Timer {
87
- pub(crate) fn after(dur: std::time::Duration) -> Self {
+ pub(crate) fn new(dur: std::time::Duration) -> Self {
88
Timer(futures_timer::Delay::new(dur))
89
}
90
0 commit comments