diff options
| author | Sean McArthur <sean@seanmonstar.com> | 2018-02-26 11:35:36 -0800 |
|---|---|---|
| committer | Sean McArthur <sean@seanmonstar.com> | 2018-02-26 11:35:36 -0800 |
| commit | c689db2c463f42422ff4ee47e28ebeb2865951ba (patch) | |
| tree | 1f27619beae5149f8d45ba0fa1575b2f9670f91c /src/libcore | |
| parent | bedbad61195d2eae69b43eca49c6d3e2aee8f208 (diff) | |
| download | rust-c689db2c463f42422ff4ee47e28ebeb2865951ba.tar.gz rust-c689db2c463f42422ff4ee47e28ebeb2865951ba.zip | |
atomic: remove 'Atomic*' from Debug output
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/sync/atomic.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 25827edee7d..8017055a5d9 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -990,9 +990,7 @@ macro_rules! atomic_int { #[$stable_debug] impl fmt::Debug for $atomic_type { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_tuple(stringify!($atomic_type)) - .field(&self.load(Ordering::SeqCst)) - .finish() + fmt::Debug::fmt(&self.load(Ordering::SeqCst), f) } } @@ -1866,7 +1864,7 @@ pub fn compiler_fence(order: Ordering) { #[stable(feature = "atomic_debug", since = "1.3.0")] impl fmt::Debug for AtomicBool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_tuple("AtomicBool").field(&self.load(Ordering::SeqCst)).finish() + fmt::Debug::fmt(&self.load(Ordering::SeqCst), f) } } @@ -1874,7 +1872,7 @@ impl fmt::Debug for AtomicBool { #[stable(feature = "atomic_debug", since = "1.3.0")] impl<T> fmt::Debug for AtomicPtr<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_tuple("AtomicPtr").field(&self.load(Ordering::SeqCst)).finish() + fmt::Debug::fmt(&self.load(Ordering::SeqCst), f) } } |
