Skip to content

Commit 74abde7

Browse files
authored
Fix missing mut in resource code example (#2196)
1 parent e46dc59 commit 74abde7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/learn/book/intro/the-next-three-letters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct Score {
2626
They're accessed and updated in systems, similar to entities and components:
2727

2828
```rs
29-
fn update_score(score: ResMut<Score>) {
29+
fn update_score(mut score: ResMut<Score>) {
3030
// ResMut gets the resource mutably, so we can update it
3131
score.points += 1;
3232
}

0 commit comments

Comments
 (0)