Skip to content

Commit

Permalink
Fix no-std build and bump MSRV to 1.61
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <dev@notgull.net>
  • Loading branch information
notgull authored and Jules-Bertholet committed Jan 11, 2024
1 parent db02b70 commit d28bdb0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ name = "async-lock"
# - Create "v3.x.y" git tag
version = "3.3.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
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"
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),* $(,)?) => {
$(
Expand Down
5 changes: 4 additions & 1 deletion src/once_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit d28bdb0

Please sign in to comment.