diff options
Diffstat (limited to 'library/std/src/sync/mutex.rs')
-rw-r--r-- | library/std/src/sync/mutex.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs index b8fec6902..b4ae6b7e0 100644 --- a/library/std/src/sync/mutex.rs +++ b/library/std/src/sync/mutex.rs @@ -490,13 +490,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Mutex<T> { d.field("data", &&**err.get_ref()); } Err(TryLockError::WouldBlock) => { - struct LockedPlaceholder; - impl fmt::Debug for LockedPlaceholder { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("<locked>") - } - } - d.field("data", &LockedPlaceholder); + d.field("data", &format_args!("<locked>")); } } d.field("poisoned", &self.poison.get()); |