Skip to content

Commit

Permalink
Increase mut-correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Aug 4, 2024
1 parent d4c03f7 commit 0d1c88c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/chapters/add_camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ is enough to make the test pass:
```rust
fn count_n_cameras(app: &mut App) -> usize {
let mut query = app.world_mut().query::<&Camera>();
return query.iter(app.world_mut()).len();
return query.iter(app.world()).len();
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/chapters/add_text.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We'll use that -and only that- for our query:
```rust
fn count_n_texts(app: &mut App) -> usize {
let mut query = app.world_mut().query::<&Text>();
return query.iter(app.world_mut()).len();
return query.iter(app.world()).len();
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/misc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ However, a query always needs a mutable World, hence an implementation that work
// Does not modify the App, I promise!
fn count_n_players(app: &mut App) -> usize {
let mut query = app.world_mut().query::<&Player>();
return query.iter(app.world_mut()).len();
return query.iter(app.world()).len();
}
```

Expand Down

0 comments on commit 0d1c88c

Please sign in to comment.