Skip to content

Commit 889506e

Browse files
committed
Inline Default::default() for atomics
1 parent 1e0967a commit 889506e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/sync/atomic.rs

Lines changed: 2 additions & 0 deletions
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)