Skip to content

Commit

Permalink
Rollup merge of rust-lang#23576 - barosl:mutex-doc, r=alexcrichton
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Mar 22, 2015
2 parents f5782fa + 84b14c5 commit 5b9e87b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use fmt;
/// among threads to ensure that a possibly invalid invariant is not witnessed.
///
/// A poisoned mutex, however, does not prevent all access to the underlying
/// data. The `PoisonError` type has an `into_guard` method which will return
/// data. The `PoisonError` type has an `into_inner` method which will return
/// the guard that would have otherwise been returned on a successful lock. This
/// allows access to the data, despite the lock being poisoned.
///
Expand Down Expand Up @@ -105,7 +105,7 @@ use fmt;
/// // pattern matched on to return the underlying guard on both branches.
/// let mut guard = match lock.lock() {
/// Ok(guard) => guard,
/// Err(poisoned) => poisoned.into_guard(),
/// Err(poisoned) => poisoned.into_inner(),
/// };
///
/// *guard += 1;
Expand Down

0 comments on commit 5b9e87b

Please sign in to comment.