Skip to content

Commit 5b9e87b

Browse files
committed
Rollup merge of #23576 - barosl:mutex-doc, r=alexcrichton
2 parents f5782fa + 84b14c5 commit 5b9e87b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/sync/mutex.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use fmt;
4040
/// among threads to ensure that a possibly invalid invariant is not witnessed.
4141
///
4242
/// A poisoned mutex, however, does not prevent all access to the underlying
43-
/// data. The `PoisonError` type has an `into_guard` method which will return
43+
/// data. The `PoisonError` type has an `into_inner` method which will return
4444
/// the guard that would have otherwise been returned on a successful lock. This
4545
/// allows access to the data, despite the lock being poisoned.
4646
///
@@ -105,7 +105,7 @@ use fmt;
105105
/// // pattern matched on to return the underlying guard on both branches.
106106
/// let mut guard = match lock.lock() {
107107
/// Ok(guard) => guard,
108-
/// Err(poisoned) => poisoned.into_guard(),
108+
/// Err(poisoned) => poisoned.into_inner(),
109109
/// };
110110
///
111111
/// *guard += 1;

0 commit comments

Comments
 (0)