From d64f3a5a78dac9dc097496d139872c860558ed89 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sat, 28 May 2022 20:08:11 +0200 Subject: [PATCH] lock_api/rwlock: Appropriately mention `try_map` instead of `map` in `try_map` docs --- lock_api/src/rwlock.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lock_api/src/rwlock.rs b/lock_api/src/rwlock.rs index e947f1ec..264b94b1 100644 --- a/lock_api/src/rwlock.rs +++ b/lock_api/src/rwlock.rs @@ -1218,13 +1218,13 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> RwLockReadGuard<'a, R, T> { } /// Attempts to make a new `MappedRwLockReadGuard` for a component of the - /// locked data. The original guard is return if the closure returns `None`. + /// locked data. Returns the original guard if the closure returns `None`. /// /// This operation cannot fail as the `RwLockReadGuard` passed /// in already locked the data. /// /// This is an associated function that needs to be - /// used as `RwLockReadGuard::map(...)`. A method would interfere with methods of + /// used as `RwLockReadGuard::try_map(...)`. A method would interfere with methods of /// the same name on the contents of the locked data. #[inline] pub fn try_map(s: Self, f: F) -> Result, Self>