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

Rephrase comment about Local<T> for clarity. #10322

Closed
wants to merge 1 commit into from

Conversation

maueroats
Copy link
Contributor

Objective

The English phrasing originally made it sound like the system had type T.

Solution

Changing the word order fixed that.

@github-actions
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples labels Oct 31, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Oct 31, 2023
@alice-i-cecile alice-i-cecile changed the title Rephrase for clarity. Rephrase comment about Local<T> for clarity. Oct 31, 2023
@alice-i-cecile
Copy link
Member

Please run 'cargo fmt --all' to format your code.: command exited with non-zero code cargo fmt --all -- --check: 1

@maueroats looks like CI failed on the formatting. I'd probably split it like:

// Sometimes systems need to be stateful. Bevy's ECS provides the `Local` system parameter
// for this case. A `Local<T>` refers to a value of type `T` that is owned by the system. 
// This value is automatically initialized using `T`'s `FromWorld`* implementation.
// In this system's `Local` (`counter`), `T` is `u32`.
// Therefore, on the first turn, `counter` has a value of 0.

Swap to that, then run cargo fmt --all just to be sure?

@alice-i-cecile alice-i-cecile added the S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! label Nov 14, 2023
@mockersf
Copy link
Member

mockersf commented Feb 1, 2024

merged in #11129

@mockersf mockersf closed this Feb 1, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 1, 2024
# Objective

- Finish PR #10322

## Solution

- Rebase changes in PR #10322 and format the changes.

Co-authored-by: Mauer-Oats <[email protected]>
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
)

# Objective

- Finish PR bevyengine#10322

## Solution

- Rebase changes in PR bevyengine#10322 and format the changes.

Co-authored-by: Mauer-Oats <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants