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:
parent
820acc1238
commit
8886039ac5
3 changed files with 8 additions and 1 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -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:
|
||||
|
|
|
@ -5,5 +5,6 @@ cfg_std! {
|
|||
}
|
||||
|
||||
cfg_unstable! {
|
||||
#[cfg(feature = "default")]
|
||||
pub mod fs;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue