fix feature settings

pull/757/head
dignifiedquire 5 years ago
parent 804a52b7fd
commit 48dd683535

@ -29,7 +29,6 @@ default = [
"log",
"num_cpus",
"pin-project-lite",
"smol",
]
docs = ["attributes", "unstable", "default"]
unstable = ["std", "broadcaster"]
@ -43,6 +42,7 @@ std = [
"once_cell",
"pin-utils",
"slab",
"smol",
]
alloc = [
"futures-core/alloc",

@ -59,14 +59,14 @@ pub(crate) trait Context {
fn context(self, message: impl Fn() -> String) -> Self;
}
#[cfg(not(target_os = "unknown"))]
#[cfg(all(not(target_os = "unknown"), feature = "default"))]
pub(crate) type Timer = smol::Timer;
#[cfg(target_arch = "wasm32")]
#[cfg(all(target_arch = "wasm32", feature = "default"))]
#[derive(Debug)]
pub(crate) struct Timer(wasm_timer::Delay);
#[cfg(target_arch = "wasm32")]
#[cfg(all(target_arch = "wasm32", feature = "default"))]
impl Timer {
pub(crate) fn after(dur: std::time::Duration) -> Self {
Timer(wasm_timer::Delay::new(dur))

Loading…
Cancel
Save