fix build with -default +unstable

and add a CI check for it

Fixes #842

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
pull/836/head
Marc-Antoine Perennou 4 years ago
parent 820acc1238
commit 8886039ac5

@ -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…
Cancel
Save