File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ use crate::sys::locks as sys;
107107/// *guard += 1;
108108/// ```
109109///
110- /// It is sometimes necessary to manually drop the mutex guard or to create an inner scope
111- /// to unlock it sooner than the end of the enclosing scope .
110+ /// To unlock a mutex guard sooner than the end of the enclosing scope,
111+ /// either create an inner scope or drop the guard manually .
112112///
113113/// ```
114114/// use std::sync::{Arc, Mutex};
@@ -153,7 +153,7 @@ use crate::sys::locks as sys;
153153/// // It's even more important here than in the threads because we `.join` the
154154/// // threads after that. If we had not dropped the mutex guard, a thread could
155155/// // be waiting forever for it, causing a deadlock.
156- /// // As in the threads a block could have been used instead of calling the
156+ /// // As in the threads, a block could have been used instead of calling the
157157/// // `drop` function.
158158/// drop(data);
159159/// // Here the mutex guard is not assigned to a variable and so, even if the
You can’t perform that action at this time.
0 commit comments