2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-29 16:55:34 +00:00

fix build with -default +unstable

and add a CI check for it

Fixes #842

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This commit is contained in:
Marc-Antoine Perennou 2020-07-24 21:03:50 +02:00
parent 820acc1238
commit 8886039ac5
3 changed files with 8 additions and 1 deletions

View file

@ -86,6 +86,12 @@ jobs:
command: check
args: --features attributes
- name: build unstable only
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features unstable
- name: tests
uses: actions-rs/cargo@v1
with:

View file

@ -5,5 +5,6 @@ cfg_std! {
}
cfg_unstable! {
#[cfg(feature = "default")]
pub mod fs;
}

View file

@ -66,7 +66,7 @@ mod timer {
#[cfg(any(feature = "unstable", feature = "default"))]
pub(crate) fn timer_after(dur: std::time::Duration) -> timer::Timer {
#[cfg(not(target_os = "unknown"))]
#[cfg(all(not(target_os = "unknown"), feature = "default"))]
once_cell::sync::Lazy::force(&crate::rt::RUNTIME);
Timer::after(dur)