about summary refs log tree commit diff
path: root/library/std/src/sync/mutex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sync/mutex.rs')
-rw-r--r--library/std/src/sync/mutex.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs
index 2f7c609c83e..b8fec6902a0 100644
--- a/library/std/src/sync/mutex.rs
+++ b/library/std/src/sync/mutex.rs
@@ -107,8 +107,8 @@ use crate::sys::locks as sys;
 /// *guard += 1;
 /// ```
 ///
-/// It is sometimes necessary to manually drop the mutex guard or to create an inner scope
-/// to unlock it sooner than the end of the enclosing scope.
+/// To unlock a mutex guard sooner than the end of the enclosing scope,
+/// either create an inner scope or drop the guard manually.
 ///
 /// ```
 /// use std::sync::{Arc, Mutex};
@@ -153,7 +153,7 @@ use crate::sys::locks as sys;
 /// // It's even more important here than in the threads because we `.join` the
 /// // threads after that. If we had not dropped the mutex guard, a thread could
 /// // be waiting forever for it, causing a deadlock.
-/// // As in the threads a block could have been used instead of calling the
+/// // As in the threads, a block could have been used instead of calling the
 /// // `drop` function.
 /// drop(data);
 /// // Here the mutex guard is not assigned to a variable and so, even if the