]> git.lizzy.rs Git - rust.git/commitdiff
Clarify the scope-related explanation
authorPoliorcetics <poliorcetics@users.noreply.github.com>
Sat, 13 Jun 2020 16:43:37 +0000 (18:43 +0200)
committerGitHub <noreply@github.com>
Sat, 13 Jun 2020 16:43:37 +0000 (18:43 +0200)
Based on the review made by dtolnay.

src/libstd/sync/mutex.rs

index 6625d4659dcac95dff8da90baefa8d2aee32c022..37c8125b0984acaa364159019d0004abae6c6784 100644 (file)
 /// *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};