about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
authorMike Robinson <mikeprobinsonuk@gmail.com>2014-10-18 08:47:57 +0100
committerMike Robinson <mikeprobinsonuk@gmail.com>2014-10-18 09:43:16 +0100
commit6e9646dfb0013c95df41bd203eba3dae0451f103 (patch)
tree2cd2c108ce3d3d44f9d9d14f750473fde1bda98e /src/libsync
parent2c0f87610d8fdcb6a90cd8dd1a372fe0ccc8a418 (diff)
downloadrust-6e9646dfb0013c95df41bd203eba3dae0451f103.tar.gz
rust-6e9646dfb0013c95df41bd203eba3dae0451f103.zip
Fix warning in Struct sync::Mutex example
let mut value = mutex.lock();
warning: variable does not need to be mutable
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/lock.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsync/lock.rs b/src/libsync/lock.rs
index 951a945f73a..78a7d128be5 100644
--- a/src/libsync/lock.rs
+++ b/src/libsync/lock.rs
@@ -167,7 +167,7 @@ impl<'a> Condvar<'a> {
 ///     val.cond.signal();
 /// });
 ///
-/// let mut value = mutex.lock();
+/// let value = mutex.lock();
 /// while *value != 2 {
 ///     value.cond.wait();
 /// }