Skip to content

Commit

Permalink
Replace atomic-polyfill with portable-atomic (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini committed Apr 28, 2024
1 parent f1bafeb commit 7d5c661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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"] }

Expand Down
2 changes: 1 addition & 1 deletion src/random_state.rs
Expand Up @@ -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;

Expand Down

0 comments on commit 7d5c661

Please sign in to comment.