From 7d5c661a74b12d5bc5448b0b83fdb429190db1a3 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Sun, 28 Apr 2024 21:24:40 +0200 Subject: [PATCH] Replace atomic-polyfill with portable-atomic (#234) --- Cargo.toml | 4 ++-- src/random_state.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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;