diff --git a/Cargo.toml b/Cargo.toml index 8fa6bcf..f4bdf53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ compile-time-rng = ["const-random"] no-rng = [] # in case this is being used on an architecture lacking core::sync::atomic::AtomicUsize and friends -atomic-polyfill = [ "dep:atomic-polyfill", "once_cell/atomic-polyfill"] +atomic-polyfill = [ "dep:portable-atomic", "once_cell/critical-section"] # Nightly-only support for AES intrinsics on 32-bit ARM nightly-arm-aes = [] @@ -82,7 +82,7 @@ version_check = "0.9.4" const-random = { version = "0.1.17", optional = true } serde = { version = "1.0.117", optional = true } cfg-if = "1.0" -atomic-polyfill = { version="1.0.1", optional=true} +portable-atomic = { version = "1.0.0", optional = true } getrandom = { version = "0.2.7", optional = true } zerocopy = { version = "0.7.31", default-features = false, features = ["simd"] } diff --git a/src/random_state.rs b/src/random_state.rs index 46a39ab..096e0a7 100644 --- a/src/random_state.rs +++ b/src/random_state.rs @@ -24,7 +24,7 @@ cfg_if::cfg_if! { } #[cfg(feature = "atomic-polyfill")] -use atomic_polyfill as atomic; +use portable_atomic as atomic; #[cfg(not(feature = "atomic-polyfill"))] use core::sync::atomic;