Skip to content

Commit c689db2

Browse files
committed
atomic: remove 'Atomic*' from Debug output
1 parent bedbad6 commit c689db2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/libcore/sync/atomic.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -990,9 +990,7 @@ macro_rules! atomic_int {
990990
#[$stable_debug]
991991
impl fmt::Debug for $atomic_type {
992992
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
993-
f.debug_tuple(stringify!($atomic_type))
994-
.field(&self.load(Ordering::SeqCst))
995-
.finish()
993+
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
996994
}
997995
}
998996

@@ -1866,15 +1864,15 @@ pub fn compiler_fence(order: Ordering) {
18661864
#[stable(feature = "atomic_debug", since = "1.3.0")]
18671865
impl fmt::Debug for AtomicBool {
18681866
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1869-
f.debug_tuple("AtomicBool").field(&self.load(Ordering::SeqCst)).finish()
1867+
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
18701868
}
18711869
}
18721870

18731871
#[cfg(target_has_atomic = "ptr")]
18741872
#[stable(feature = "atomic_debug", since = "1.3.0")]
18751873
impl<T> fmt::Debug for AtomicPtr<T> {
18761874
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1877-
f.debug_tuple("AtomicPtr").field(&self.load(Ordering::SeqCst)).finish()
1875+
fmt::Debug::fmt(&self.load(Ordering::SeqCst), f)
18781876
}
18791877
}
18801878

0 commit comments

Comments
 (0)