diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b8673e..fd0c397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,11 @@ jobs: msrv: runs-on: ubuntu-latest + strategy: + matrix: + # When updating this, the reminder to update the minimum supported + # Rust version in Cargo.toml. + rust: ['1.61'] steps: - uses: actions/checkout@v4 - name: Install cargo-hack diff --git a/Cargo.toml b/Cargo.toml index 93ab395..6b06038 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ name = "async-lock" # - Create "v3.x.y" git tag version = "3.3.0" authors = ["Stjepan Glavina "] -edition = "2021" -rust-version = "1.60" +edition = "2018" +rust-version = "1.61" description = "Async synchronization primitives" license = "Apache-2.0 OR MIT" repository = "https://github.com/smol-rs/async-lock" diff --git a/src/lib.rs b/src/lib.rs index e0aadde..6d64aa3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,6 +58,7 @@ macro_rules! ready { /// Pins a variable on the stack. /// /// TODO: Drop in favor of `core::pin::pin`, once MSRV is bumped to 1.68. +#[cfg(all(feature = "std", not(target_family = "wasm")))] macro_rules! pin { ($($x:ident),* $(,)?) => { $( diff --git a/src/once_cell.rs b/src/once_cell.rs index eef7bc9..9b5ebbc 100644 --- a/src/once_cell.rs +++ b/src/once_cell.rs @@ -9,9 +9,12 @@ use core::sync::atomic::{AtomicUsize, Ordering}; #[cfg(all(feature = "std", not(target_family = "wasm")))] use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker}; -use event_listener::{Event, Listener}; +use event_listener::Event; use event_listener_strategy::{NonBlocking, Strategy}; +#[cfg(all(feature = "std", not(target_family = "wasm")))] +use event_listener::Listener; + /// The current state of the `OnceCell`. #[derive(Copy, Clone, PartialEq, Eq)] #[repr(usize)]