Closed
Description
MutexGuard
's Debug
implementation just forwards to the Mutex
's Debug
implementation, which will simply print <locked>
, because the Mutex
was locked (by that very same MutexGuard
).
Effectively, this means that the current Debug
implementation of MutexGuard
is equivalent to:
f.write_str("MutexGuard { lock: Mutex { data: <locked> } }")
Instead, it should not try to lock the mutex, but use its own Deref
implementation to print the contents of the mutex.