From 8aaa04b5c5c1d47ee4c4622908f303b8b9632979 Mon Sep 17 00:00:00 2001 From: zachs18 <8355914+zachs18@users.noreply.github.com> Date: Fri, 23 Feb 2024 20:18:04 -0600 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Amanieu d'Antras --- library/std/src/sync/mutex.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs index 1b05247bb7c..7b4b53e83db 100644 --- a/library/std/src/sync/mutex.rs +++ b/library/std/src/sync/mutex.rs @@ -612,7 +612,7 @@ pub fn map(orig: Self, f: F) -> MappedMutexGuard<'a, U> F: FnOnce(&mut T) -> &mut U, U: ?Sized, { - // SAFETY: the conditions of `MutedGuard::new` were satisfied when the original guard + // SAFETY: the conditions of `MutexGuard::new` were satisfied when the original guard // was created, and have been upheld throughout `map` and/or `try_map`. // The signature of the closure guarantees that it will not "leak" the lifetime of the reference // passed to it. If the closure panics, the guard will be dropped. @@ -720,7 +720,7 @@ pub fn map(mut orig: Self, f: F) -> MappedMutexGuard<'a, U> F: FnOnce(&mut T) -> &mut U, U: ?Sized, { - // SAFETY: the conditions of `MutedGuard::new` were satisfied when the original guard + // SAFETY: the conditions of `MutexGuard::new` were satisfied when the original guard // was created, and have been upheld throughout `map` and/or `try_map`. // The signature of the closure guarantees that it will not "leak" the lifetime of the reference // passed to it. If the closure panics, the guard will be dropped. @@ -751,7 +751,7 @@ pub fn try_map(mut orig: Self, f: F) -> Result, Se F: FnOnce(&mut T) -> Option<&mut U>, U: ?Sized, { - // SAFETY: the conditions of `MutedGuard::new` were satisfied when the original guard + // SAFETY: the conditions of `MutexGuard::new` were satisfied when the original guard // was created, and have been upheld throughout `map` and/or `try_map`. // The signature of the closure guarantees that it will not "leak" the lifetime of the reference // passed to it. If the closure panics, the guard will be dropped.