]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/mutex.rs
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
[rust.git] / src / libstd / sync / mutex.rs
index 856bb260424908cfd6a7a16673076d84bd6f75bf..340dca7ce73b868523b8dec1e1a55c3a94e4c2af 100644 (file)
@@ -335,7 +335,7 @@ pub fn into_inner(self) -> LockResult<T> where T: Sized {
     /// Returns a mutable reference to the underlying data.
     ///
     /// Since this call borrows the `Mutex` mutably, no actual locking needs to
-    /// take place---the mutable borrow statically guarantees no locks exist.
+    /// take place -- the mutable borrow statically guarantees no locks exist.
     ///
     /// # Errors
     ///
@@ -450,9 +450,7 @@ fn drop(&mut self) {
 #[stable(feature = "std_debug", since = "1.16.0")]
 impl<'a, T: ?Sized + fmt::Debug> fmt::Debug for MutexGuard<'a, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_struct("MutexGuard")
-            .field("lock", &self.__lock)
-            .finish()
+        fmt::Debug::fmt(&**self, f)
     }
 }