about summary refs log tree commit diff
path: root/src/doc/intro.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/intro.md')
-rw-r--r--src/doc/intro.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/intro.md b/src/doc/intro.md
index 3487738467f..a7c37ba8e07 100644
--- a/src/doc/intro.md
+++ b/src/doc/intro.md
@@ -485,9 +485,9 @@ fn main() {
         Thread::spawn(move || {
             let mut array = number.lock().unwrap();
 
-            (*array)[i] += 1;
+            array[i as usize] += 1;
 
-            println!("numbers[{}] is {}", i, (*array)[i]);
+            println!("numbers[{}] is {}", i, array[i as usize]);
         });
     }
 }