Skip to content

Commit

Permalink
Fix typos in try_map documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Sep 20, 2022
1 parent 844be5e commit b9612b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lock_api/src/remutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> ReentrantMutexGu
/// in already locked the mutex.
///
/// This is an associated function that needs to be
/// used as `ReentrantMutexGuard::map(...)`. A method would interfere with methods of
/// used as `ReentrantMutexGuard::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>(
Expand Down Expand Up @@ -942,7 +942,7 @@ impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a>
/// in already locked the mutex.
///
/// This is an associated function that needs to be
/// used as `MappedReentrantMutexGuard::map(...)`. A method would interfere with methods of
/// used as `MappedReentrantMutexGuard::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>(
Expand Down
6 changes: 3 additions & 3 deletions lock_api/src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> RwLockWriteGuard<'a, R, T> {
/// in already locked the data.
///
/// This is an associated function that needs to be
/// used as `RwLockWriteGuard::map(...)`. A method would interfere with methods of
/// used as `RwLockWriteGuard::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<MappedRwLockWriteGuard<'a, R, U>, Self>
Expand Down Expand Up @@ -2374,7 +2374,7 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> MappedRwLockReadGuard<'a, R, T> {
/// in already locked the data.
///
/// This is an associated function that needs to be
/// used as `MappedRwLockReadGuard::map(...)`. A method would interfere with methods of
/// used as `MappedRwLockReadGuard::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 Expand Up @@ -2512,7 +2512,7 @@ impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> MappedRwLockWriteGuard<'a, R, T> {
/// in already locked the data.
///
/// This is an associated function that needs to be
/// used as `MappedRwLockWriteGuard::map(...)`. A method would interfere with methods of
/// used as `MappedRwLockWriteGuard::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<MappedRwLockWriteGuard<'a, R, U>, Self>
Expand Down

0 comments on commit b9612b3

Please sign in to comment.