summaryrefslogtreecommitdiffstats
path: root/vendor/lock_api/src/remutex.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/lock_api/src/remutex.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/lock_api/src/remutex.rs b/vendor/lock_api/src/remutex.rs
index fa0e934d1..3e2010f2b 100644
--- a/vendor/lock_api/src/remutex.rs
+++ b/vendor/lock_api/src/remutex.rs
@@ -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>(
@@ -654,10 +654,10 @@ impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> ReentrantMutexGu
f: F,
) -> Result<MappedReentrantMutexGuard<'a, R, G, U>, Self>
where
- F: FnOnce(&mut T) -> Option<&mut U>,
+ F: FnOnce(&T) -> Option<&U>,
{
let raw = &s.remutex.raw;
- let data = match f(unsafe { &mut *s.remutex.data.get() }) {
+ let data = match f(unsafe { &*s.remutex.data.get() }) {
Some(data) => data,
None => return Err(s),
};
@@ -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>(