Skip to content

Change event to event_key where it refers to an EventKey #20060

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
merged 4 commits into from
Jul 16, 2025

Conversation

SteveAlexander
Copy link
Contributor

Objective

The ECS code to do with Observers was recently refactored to use an EventKey newtype. On reading through the PR, I was a bit confused that sometimes a variable called event refers to an Event and sometimes it refers to an EventKey. I think the code is clearer when event refers to an Event and event_key refers to an EventKey.

Solution

This PR renames some uses of event to event_key.

Testing

  • Did you test these changes? If so, how?

I ran cargo run -p ci -- tests

  • Are there any parts that need more testing?

No

  • How can other people (reviewers) test your changes? Is there anything specific they need to know?

No.

  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test?

Probably not relevant, but MacOS.

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Welcome, new contributor!

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

@SteveAlexander
Copy link
Contributor Author

SteveAlexander commented Jul 9, 2025

And now I remember that backtick has a special meaning in zsh, and my commit message doesn't make sense. 🤦‍♂️

@hukasu hukasu added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 9, 2025
@copygirl
Copy link
Contributor

copygirl commented Jul 9, 2025

And now I remember that backtick has a special meaning in zsh, and my commit message doesn't make sense. 🤦‍♂️

You can still change your commit message and force-push to your PR branch.

@SteveAlexander
Copy link
Contributor Author

@copygirl thanks!

@mockersf mockersf added this pull request to the merge queue Jul 16, 2025
@SteveAlexander
Copy link
Contributor Author

Thanks for the reviews @Zeophlite and @mockersf

Merged via the queue into bevyengine:main with commit 713acc2 Jul 16, 2025
32 checks passed
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-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants