Auto merge of #118792 - naglis:fix-mutex-doc-typo, r=workingjubilee
Fix typo in `std::sync::Mutex` example
This commit is contained in:
commit
c1a3919378
@ -146,7 +146,7 @@ use crate::sys::locks as sys;
|
|||||||
/// let result = data.iter().fold(0, |acc, x| acc + x * 2);
|
/// let result = data.iter().fold(0, |acc, x| acc + x * 2);
|
||||||
/// data.push(result);
|
/// data.push(result);
|
||||||
/// // We drop the `data` explicitly because it's not necessary anymore and the
|
/// // We drop the `data` explicitly because it's not necessary anymore and the
|
||||||
/// // thread still has work to do. This allow other threads to start working on
|
/// // thread still has work to do. This allows other threads to start working on
|
||||||
/// // the data immediately, without waiting for the rest of the unrelated work
|
/// // the data immediately, without waiting for the rest of the unrelated work
|
||||||
/// // to be done here.
|
/// // to be done here.
|
||||||
/// //
|
/// //
|
||||||
|
Loading…
x
Reference in New Issue
Block a user