Skip to content

Commit

Permalink
Merge pull request #216 from Sonic78/patch-1
Browse files Browse the repository at this point in the history
Added the missing ´mut´ to the code example
  • Loading branch information
jonathanpallant authored Oct 16, 2024
2 parents 9d9d12f + 77ba6c6 commit 5470b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training-slides/src/thread-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ It's our old friend/enemy shared mutability!
```rust ignore
fn thread_function(arg: &std::cell::RefCell<i32>) {
for _ in 0..1_000_000 {
let p = arg.borrow_mut();
let mut p = arg.borrow_mut();
*p += 1;
}
}
Expand Down

0 comments on commit 5470b1f

Please sign in to comment.