Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,11 @@ fn main() {
// Take the lock, along with exclusive access to the underlying array
let mut numbers = numbers_lock.lock();
// This is ugly for now, but will be replaced by
// `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`
// in the near future.
// See: https://github.com/rust-lang/rust/issues/6515
*numbers.get_mut(num as uint) = *numbers.get_mut(num as uint) + 1;
*numbers.get_mut(num as uint) += 1;
println!("{}", (*numbers)[num as uint]);
Expand Down