Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few typos in error docs #11709

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions errors/B0001.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# B0001

To keep [Rust rules on references](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references) (either one mutable reference or any number of immutable references) on a component, it is not possible to have two queries on the same component when one request mutable access to it in the same system.
To keep [Rust rules on references](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references) (either one mutable reference or any number of immutable references) on a component, it is not possible to have two queries on the same component when one requests mutable access to it in the same system.

Erroneous code example:

Expand Down Expand Up @@ -62,7 +62,7 @@ fn main() {

Solution #2: use a `ParamSet`

A `ParamSet` will let you have conflicting queries as a parameter, but you will still be responsible of not using them at the same time in your system.
A `ParamSet` will let you have conflicting queries as a parameter, but you will still be responsible for not using them at the same time in your system.

```rust,no_run
use bevy::prelude::*;
Expand Down
4 changes: 2 additions & 2 deletions errors/B0002.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ fn main() {
}
```

This will panic, as it's not possible to have both a mutable and an immutable resource on `State` at the same time.
This will panic, as it's not possible to have both a mutable and an immutable resource on `Assets<StandardMaterial>` at the same time.

As a mutable resource already provide access to the current resource value, you can remove the immutable resource.
As a mutable resource already provides access to the current resource value, so you can remove the immutable resource.

```rust,no_run
use bevy::prelude::*;
Expand Down