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

[Merged by Bors] - Use EventWriter for gilrs_system #3413

Closed
wants to merge 1 commit into from

Conversation

PaperCow
Copy link
Contributor

@PaperCow PaperCow commented Dec 21, 2021

Objective

Solution

  • Uses EventWriter instead of ResMut<Events<T>> in gilrs_system.rs.

This is the only remaining instance I could find of Res<Event or ResMut<Event being used directly instead of through EventReader or EventWriter.

I also renamed the argument from event to events for consistency. All other instances I could find in the engine of EventWriter use a plural argument name. Happy to undo or modify this change if desired.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Dec 21, 2021
@alice-i-cecile alice-i-cecile added A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change and removed S-Needs-Triage This issue needs to be labelled labels Dec 21, 2021
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Dec 21, 2021

Awesome, thanks! Were you able to find any other usages of Res<Events or ResMut<Events in the code base? We should clean this all up while we're at it.

EDIT: Ah I see you commented in #3413: this is the last remaining instance. Great work, thanks for your first contribution!

@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 Dec 21, 2021
@mockersf
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Dec 21, 2021
# Objective

- fixes #3397 

## Solution

- Uses EventWriter instead of ResMut<Event> in gilrs_system.rs.

I also renamed the argument from `event` to `events` for consistency. All other instances I could find in the engine of EventWriter use a plural argument name. Happy to undo or modify this change if desired.
@bors bors bot changed the title Use EventWriter for gilrs_system [Merged by Bors] - Use EventWriter for gilrs_system Dec 22, 2021
@bors bors bot closed this Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change 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.

Swap to using EventWriter and EventReader in internal engine code
3 participants