mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-04 17:19:41 +00:00
fix feature settings
This commit is contained in:
parent
804a52b7fd
commit
48dd683535
2 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue