Skip to content

Commit 34b3ff0

Browse files
authored
Clarify the scope-related explanation
Based on the review made by dtolnay.
1 parent f747073 commit 34b3ff0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libstd/sync/mutex.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
108108
/// *guard += 1;
109109
/// ```
110110
///
111-
/// It is sometimes necessary to manually drop the mutex
112-
/// guard to unlock it as soon as possible. If you need the resource until the end of
113-
/// the scope, this is not needed.
111+
/// It is sometimes necessary to manually drop the mutex guard
112+
/// to unlock it sooner than the end of the enclosing scope.
114113
///
115114
/// ```
116115
/// use std::sync::{Arc, Mutex};

0 commit comments

Comments
 (0)