We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6da3889 + a9979ad commit f5ac411Copy full SHA for f5ac411
src/doc/intro.md
@@ -359,10 +359,11 @@ fn main() {
359
// Take the lock, along with exclusive access to the underlying array
360
let mut numbers = numbers_lock.lock();
361
362
- // This is ugly for now, but will be replaced by
363
- // `numbers[num as uint] += 1` in the near future.
+ // This is ugly for now because of the need for `get_mut`, but
+ // will be replaced by `numbers[num as uint] += 1`
364
+ // in the near future.
365
// See: https://github.com/rust-lang/rust/issues/6515
- *numbers.get_mut(num as uint) = *numbers.get_mut(num as uint) + 1;
366
+ *numbers.get_mut(num as uint) += 1;
367
368
println!("{}", (*numbers)[num as uint]);
369
0 commit comments