Inline Default::default() for atomics

This commit is contained in:
Scott Olson 2020-11-01 04:38:41 +00:00
parent a6403b0f04
commit e5b1f69d63

View file

@ -155,6 +155,7 @@ pub struct AtomicBool {
#[stable(feature = "rust1", since = "1.0.0")]
impl Default for AtomicBool {
/// Creates an `AtomicBool` initialized to `false`.
#[inline]
fn default() -> Self {
Self::new(false)
}
@ -1212,6 +1213,7 @@ macro_rules! atomic_int {
#[$stable]
impl Default for $atomic_type {
#[inline]
fn default() -> Self {
Self::new(Default::default())
}