diff options
| author | Poliorcetics <poliorcetics@users.noreply.github.com> | 2020-06-13 18:43:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-13 18:43:37 +0200 |
| commit | 34b3ff06e101f60cb69268ee83c93c177b63c322 (patch) | |
| tree | 21e5491b97d418c3ec2f5861314dd516ebc02310 /src/libstd/sync | |
| parent | f747073fc1751afd2cfd4395283a4822b618f2da (diff) | |
| download | rust-34b3ff06e101f60cb69268ee83c93c177b63c322.tar.gz rust-34b3ff06e101f60cb69268ee83c93c177b63c322.zip | |
Clarify the scope-related explanation
Based on the review made by dtolnay.
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/mutex.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 6625d4659dc..37c8125b098 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -108,9 +108,8 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult}; /// *guard += 1; /// ``` /// -/// It is sometimes necessary to manually drop the mutex -/// guard to unlock it as soon as possible. If you need the resource until the end of -/// the scope, this is not needed. +/// It is sometimes necessary to manually drop the mutex guard +/// to unlock it sooner than the end of the enclosing scope. /// /// ``` /// use std::sync::{Arc, Mutex}; |
