Skip to content

Commit e5b1f69

Browse files
committed
Inline Default::default() for atomics
1 parent a6403b0 commit e5b1f69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/sync/atomic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pub struct AtomicBool {
155155
#[stable(feature = "rust1", since = "1.0.0")]
156156
impl Default for AtomicBool {
157157
/// Creates an `AtomicBool` initialized to `false`.
158+
#[inline]
158159
fn default() -> Self {
159160
Self::new(false)
160161
}
@@ -1212,6 +1213,7 @@ macro_rules! atomic_int {
12121213

12131214
#[$stable]
12141215
impl Default for $atomic_type {
1216+
#[inline]
12151217
fn default() -> Self {
12161218
Self::new(Default::default())
12171219
}

0 commit comments

Comments
 (0)