Skip to content

Commit

Permalink
std: _lock -> _guard in Mutex example
Browse files Browse the repository at this point in the history
The comment in the next line was already talking about `_guard`, and the
scope guard a couple lines further down is also called `guard`, so I
assume that was just a typo.
  • Loading branch information
ben0x539 committed Feb 8, 2016
1 parent e06f692 commit cab8c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sync/mutex.rs
Expand Up @@ -96,7 +96,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
/// let _ = thread::spawn(move || -> () {
/// // This thread will acquire the mutex first, unwrapping the result of
/// // `lock` because the lock has not been poisoned.
/// let _lock = lock2.lock().unwrap();
/// let _guard = lock2.lock().unwrap();
///
/// // This panic while holding the lock (`_guard` is in scope) will poison
/// // the mutex.
Expand Down

0 comments on commit cab8c2a

Please sign in to comment.