X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibstd%2Fsync%2Fmutex.rs;h=340dca7ce73b868523b8dec1e1a55c3a94e4c2af;hb=9a3e22e32f634014b02f13495aef3f0e8cdbb1b7;hp=856bb260424908cfd6a7a16673076d84bd6f75bf;hpb=e69a5cb2d7d7a8ae40a6ea3687b7c1f319a2a8ea;p=rust.git diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 856bb260424..340dca7ce73 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -335,7 +335,7 @@ pub fn into_inner(self) -> LockResult 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) } }