Skip to content

Commit

Permalink
fix feature settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 2, 2020
1 parent 804a52b commit 48dd683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ default = [
"log",
"num_cpus",
"pin-project-lite",
"smol",
]
docs = ["attributes", "unstable", "default"]
unstable = ["std", "broadcaster"]
Expand All @@ -43,6 +42,7 @@ std = [
"once_cell",
"pin-utils",
"slab",
"smol",
]
alloc = [
"futures-core/alloc",
Expand Down
6 changes: 3 additions & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 48dd683

Please sign in to comment.