]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/mutex.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / libstd / sync / mutex.rs
index 6eeddc28512d95716c9e271de8c244e3a8646cbf..0cb16b19d7326767cb2282cd74edfea3489f66d0 100644 (file)
@@ -416,7 +416,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 impl<'mutex, T: ?Sized> MutexGuard<'mutex, T> {
     unsafe fn new(lock: &'mutex Mutex<T>) -> LockResult<MutexGuard<'mutex, T>> {
-        poison::map_result(lock.poison.borrow(), |guard| MutexGuard { lock: lock, poison: guard })
+        poison::map_result(lock.poison.borrow(), |guard| MutexGuard { lock, poison: guard })
     }
 }