Skip to content

Commit 6e9646d

Browse files
committed
Fix warning in Struct sync::Mutex example
let mut value = mutex.lock(); warning: variable does not need to be mutable
1 parent 2c0f876 commit 6e9646d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsync/lock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl<'a> Condvar<'a> {
167167
/// val.cond.signal();
168168
/// });
169169
///
170-
/// let mut value = mutex.lock();
170+
/// let value = mutex.lock();
171171
/// while *value != 2 {
172172
/// value.cond.wait();
173173
/// }

0 commit comments

Comments
 (0)