Skip to content

Commit b622b17

Browse files
fix feature settings
1 parent ed3aab9 commit b622b17

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ default = [
2929
"log",
3030
"num_cpus",
3131
"pin-project-lite",
32-
"smol",
3332
]
3433
docs = ["attributes", "unstable", "default"]
3534
unstable = ["std", "broadcaster"]
@@ -43,6 +42,7 @@ std = [
4342
"once_cell",
4443
"pin-utils",
4544
"slab",
45+
"smol",
4646
]
4747
alloc = [
4848
"futures-core/alloc",

src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ pub(crate) trait Context {
5959
fn context(self, message: impl Fn() -> String) -> Self;
6060
}
6161

62-
#[cfg(not(target_os = "unknown"))]
62+
#[cfg(all(not(target_os = "unknown"), feature = "default"))]
6363
pub(crate) type Timer = smol::Timer;
6464

65-
#[cfg(target_arch = "wasm32")]
65+
#[cfg(all(target_arch = "wasm32", feature = "default"))]
6666
#[derive(Debug)]
6767
pub(crate) struct Timer(wasm_timer::Delay);
6868

69-
#[cfg(target_arch = "wasm32")]
69+
#[cfg(all(target_arch = "wasm32", feature = "default"))]
7070
impl Timer {
7171
pub(crate) fn after(dur: std::time::Duration) -> Self {
7272
Timer(wasm_timer::Delay::new(dur))

0 commit comments

Comments
 (0)