File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ static HELLO_WORLD: &str = "Hello world!";
41
41
42
42
// mutable global static variable
43
43
static mut COUNTER : u32 = 0 ;
44
- fn add_to_count ( inc : u32 ) {
44
+ fn add_to_counter ( inc : u32 ) {
45
45
// mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
46
46
// so must be within unsafe block.
47
47
unsafe {
@@ -123,7 +123,7 @@ fn main() {
123
123
// so must be within unsafe block.
124
124
println ! ( "Counter is {COUNTER}" ) ;
125
125
}
126
- add_to_count ( 3 ) ;
126
+ add_to_counter ( 3 ) ;
127
127
unsafe {
128
128
// mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
129
129
// so must be within unsafe block.
You can’t perform that action at this time.
0 commit comments