Skip to content

Commit e4d1696

Browse files
committed
feat(utils): implement [Zero]Init on AtomicBool
1 parent 4ad77ae commit e4d1696

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/constance/src/utils/init.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ impl_init! {
7777
isize => 0,
7878
f32 => 0.0,
7979
f64 => 0.0,
80+
atomic::AtomicBool => atomic::AtomicBool::new(false),
8081
atomic::AtomicU8 => atomic::AtomicU8::new(0),
81-
atomic::AtomicU16=> atomic::AtomicU16::new(0),
82+
atomic::AtomicU16 => atomic::AtomicU16::new(0),
8283
atomic::AtomicU32 => atomic::AtomicU32::new(0),
8384
atomic::AtomicU64 => atomic::AtomicU64::new(0),
8485
atomic::AtomicUsize => atomic::AtomicUsize::new(0),

src/constance/src/utils/zeroinit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ impl_zero_init! {
5151
isize,
5252
f32,
5353
f64,
54+
atomic::AtomicBool,
5455
atomic::AtomicU8,
5556
atomic::AtomicU16,
5657
atomic::AtomicU32,

0 commit comments

Comments
 (0)