diff --git a/src/imp_cs.rs b/src/imp_cs.rs index 7d05e50..6b8d53d 100644 --- a/src/imp_cs.rs +++ b/src/imp_cs.rs @@ -1,7 +1,7 @@ use core::panic::{RefUnwindSafe, UnwindSafe}; -use portable_atomic::{AtomicBool, Ordering}; use critical_section::{CriticalSection, Mutex}; +use portable_atomic::{AtomicBool, Ordering}; use crate::unsync; diff --git a/src/race.rs b/src/race.rs index da8a2fc..89e4367 100644 --- a/src/race.rs +++ b/src/race.rs @@ -19,10 +19,10 @@ //! `Acquire` and `Release` have very little performance overhead on most //! architectures versus `Relaxed`. -#[cfg(feature = "critical-section")] -use portable_atomic as atomic; #[cfg(not(feature = "critical-section"))] use core::sync::atomic; +#[cfg(feature = "critical-section")] +use portable_atomic as atomic; use atomic::{AtomicPtr, AtomicUsize, Ordering}; use core::cell::UnsafeCell;