Skip to content

Commit

Permalink
Merge pull request #342 from MarijnS95/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu authored May 29, 2022
2 parents d979c8c + d64f3a5 commit 6f6e021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lock_api/src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<U: ?Sized, F>(s: Self, f: F) -> Result<MappedRwLockReadGuard<'a, R, U>, Self>
Expand Down

0 comments on commit 6f6e021

Please sign in to comment.