Skip to content

Commit

Permalink
Rollup merge of rust-lang#57703 - m-ou-se:mutexguard-debug, r=cramertj
Browse files Browse the repository at this point in the history
Make MutexGuard's Debug implementation more useful.

Fixes rust-lang#57702.
  • Loading branch information
Centril authored Jan 26, 2019
2 parents 1dcbcb9 + 2e9deed commit d638b30
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/libstd/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ impl<'a, T: ?Sized> Drop for MutexGuard<'a, T> {
#[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)
}
}

Expand Down

0 comments on commit d638b30

Please sign in to comment.