diff --git a/Cargo.toml b/Cargo.toml index 9d4189b..7c8443c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ members = ["xtask"] [dependencies] parking_lot_core = { version = "0.9.3", optional = true, default_features = false } -atomic-polyfill = { version = "1", optional = true } +portable-atomic = { version = "1", optional = true } critical-section = { version = "1", optional = true } [dev-dependencies] @@ -48,15 +48,12 @@ parking_lot = ["dep:parking_lot_core"] # Uses `critical-section` to implement `sync` and `race` modules. in # `#![no_std]` mode. Please read `critical-section` docs carefully # before enabling this feature. -critical-section = ["dep:critical-section", "dep:atomic-polyfill" ] +critical-section = ["dep:critical-section", "portable-atomic" ] # Enables semver-exempt APIs of this crate. # At the moment, this feature is unused. unstable = [] -# Only for backwards compatibility. -atomic-polyfill = ["critical-section"] - [[example]] name = "bench" required-features = ["std"] diff --git a/src/imp_cs.rs b/src/imp_cs.rs index 04018f1..7d05e50 100644 --- a/src/imp_cs.rs +++ b/src/imp_cs.rs @@ -1,6 +1,6 @@ use core::panic::{RefUnwindSafe, UnwindSafe}; -use atomic_polyfill::{AtomicBool, Ordering}; +use portable_atomic::{AtomicBool, Ordering}; use critical_section::{CriticalSection, Mutex}; use crate::unsync;