We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b9b97b commit c1221e2Copy full SHA for c1221e2
src/libstd/sync/mutex.rs
@@ -69,7 +69,7 @@ use sys_common::poison::{self, TryLockError, TryLockResult, LockResult};
69
///
70
/// let (tx, rx) = channel();
71
/// for _ in 0..N {
72
-/// let (data, tx) = (data.clone(), tx.clone());
+/// let (data, tx) = (Arc::clone(&data), tx.clone());
73
/// thread::spawn(move || {
74
/// // The shared state can only be accessed once the lock is held.
75
/// // Our non-atomic increment is safe because we're the only thread
0 commit comments