Skip to content

Commit 8886039

Browse files
committed
fix build with -default +unstable
and add a CI check for it Fixes #842 Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 820acc1 commit 8886039

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ jobs:
8686
command: check
8787
args: --features attributes
8888

89+
- name: build unstable only
90+
uses: actions-rs/cargo@v1
91+
with:
92+
command: build
93+
args: --no-default-features --features unstable
94+
8995
- name: tests
9096
uses: actions-rs/cargo@v1
9197
with:

src/os/windows/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ cfg_std! {
55
}
66

77
cfg_unstable! {
8+
#[cfg(feature = "default")]
89
pub mod fs;
910
}

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod timer {
6666

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

7272
Timer::after(dur)

0 commit comments

Comments
 (0)