about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPoliorcetics <poliorcetics@users.noreply.github.com>2020-06-13 18:43:37 +0200
committerGitHub <noreply@github.com>2020-06-13 18:43:37 +0200
commit34b3ff06e101f60cb69268ee83c93c177b63c322 (patch)
tree21e5491b97d418c3ec2f5861314dd516ebc02310 /src/libstd
parentf747073fc1751afd2cfd4395283a4822b618f2da (diff)
downloadrust-34b3ff06e101f60cb69268ee83c93c177b63c322.tar.gz
rust-34b3ff06e101f60cb69268ee83c93c177b63c322.zip
Clarify the scope-related explanation
Based on the review made by dtolnay.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sync/mutex.rs5
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};