diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-26 18:21:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-26 18:21:42 +0100 |
| commit | 1e8fde07b6d27f089f079544aaedaba37d82ae81 (patch) | |
| tree | 33682af36a7da976b297367b12505f5dc63720a6 /src/libstd | |
| parent | 5e6c2f40d05df697364162d640d3198b2190a076 (diff) | |
| parent | 2e9deed9f130d2342bec2a55358305cb7137605e (diff) | |
| download | rust-1e8fde07b6d27f089f079544aaedaba37d82ae81.tar.gz rust-1e8fde07b6d27f089f079544aaedaba37d82ae81.zip | |
Rollup merge of #57703 - m-ou-se:mutexguard-debug, r=cramertj
Make MutexGuard's Debug implementation more useful. Fixes #57702.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/sync/mutex.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 856bb260424..59829db23cb 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -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) } } |
