mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-15 19:01:01 +00:00
Deduplicate atomic_impl macro calls
This commit is contained in:
+2
-17
@@ -2677,7 +2677,7 @@ macro_rules! atomic_impl {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", no_target_has_atomic, not(no_std_atomic)))]
|
#[cfg(all(feature = "std", not(no_std_atomic)))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicBool "8"
|
AtomicBool "8"
|
||||||
AtomicI8 "8"
|
AtomicI8 "8"
|
||||||
@@ -2690,27 +2690,12 @@ atomic_impl! {
|
|||||||
AtomicUsize "ptr"
|
AtomicUsize "ptr"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", no_target_has_atomic, not(no_std_atomic64)))]
|
#[cfg(all(feature = "std", not(no_std_atomic64)))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicI64 "64"
|
AtomicI64 "64"
|
||||||
AtomicU64 "64"
|
AtomicU64 "64"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", not(no_target_has_atomic)))]
|
|
||||||
atomic_impl! {
|
|
||||||
AtomicBool "8"
|
|
||||||
AtomicI8 "8"
|
|
||||||
AtomicI16 "16"
|
|
||||||
AtomicI32 "32"
|
|
||||||
AtomicI64 "64"
|
|
||||||
AtomicIsize "ptr"
|
|
||||||
AtomicU8 "8"
|
|
||||||
AtomicU16 "16"
|
|
||||||
AtomicU32 "32"
|
|
||||||
AtomicU64 "64"
|
|
||||||
AtomicUsize "ptr"
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
struct FromStrVisitor<T> {
|
struct FromStrVisitor<T> {
|
||||||
expecting: &'static str,
|
expecting: &'static str,
|
||||||
|
|||||||
+2
-17
@@ -963,7 +963,7 @@ macro_rules! atomic_impl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", no_target_has_atomic, not(no_std_atomic)))]
|
#[cfg(all(feature = "std", not(no_std_atomic)))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicBool "8"
|
AtomicBool "8"
|
||||||
AtomicI8 "8"
|
AtomicI8 "8"
|
||||||
@@ -976,23 +976,8 @@ atomic_impl! {
|
|||||||
AtomicUsize "ptr"
|
AtomicUsize "ptr"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", no_target_has_atomic, not(no_std_atomic64)))]
|
#[cfg(all(feature = "std", not(no_std_atomic64)))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicI64 "64"
|
AtomicI64 "64"
|
||||||
AtomicU64 "64"
|
AtomicU64 "64"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", not(no_target_has_atomic)))]
|
|
||||||
atomic_impl! {
|
|
||||||
AtomicBool "8"
|
|
||||||
AtomicI8 "8"
|
|
||||||
AtomicI16 "16"
|
|
||||||
AtomicI32 "32"
|
|
||||||
AtomicI64 "64"
|
|
||||||
AtomicIsize "ptr"
|
|
||||||
AtomicU8 "8"
|
|
||||||
AtomicU16 "16"
|
|
||||||
AtomicU32 "32"
|
|
||||||
AtomicU64 "64"
|
|
||||||
AtomicUsize "ptr"
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user