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] - Add a wrapper around Entity for RemovedComponents #7503

Closed

Conversation

CatThingy
Copy link
Contributor

@CatThingy CatThingy commented Feb 4, 2023

Objective

  • Make the internals of RemovedComponents clearer

Solution

  • Add a wrapper around Entity, used in RemovedComponents as Events<RemovedComponentsEntity>

Changelog

  • RemovedComponents now internally uses an Events<RemovedComponentsEntity> instead of an Events<Entity>

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 4, 2023
@alice-i-cecile alice-i-cecile added this to the 0.10 milestone Feb 4, 2023
@@ -19,14 +19,18 @@ use std::{
option,
};

/// Wrapper around a [`ManualEventReader<Entity>`] so that we
/// Wrapper around [`Entity`] for [`RemovedComponents`].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve these docs? Maybe try to explain how they're used in events?

@alice-i-cecile
Copy link
Member

Ping @Aceeri for review, as this is modifying the code added by your PR :)

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer!

@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 Feb 5, 2023
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 5, 2023
# Objective

- Make the internals of `RemovedComponents` clearer


## Solution

- Add a wrapper around `Entity`, used in `RemovedComponents` as `Events<RemovedComponentsEntity>`

---

## Changelog

- `RemovedComponents` now internally uses an `Events<RemovedComponentsEntity>` instead of an `Events<Entity>`
@bors
Copy link
Contributor

bors bot commented Feb 5, 2023

Build failed:

@alice-i-cecile
Copy link
Member

bors retry

bors bot pushed a commit that referenced this pull request Feb 5, 2023
# Objective

- Make the internals of `RemovedComponents` clearer


## Solution

- Add a wrapper around `Entity`, used in `RemovedComponents` as `Events<RemovedComponentsEntity>`

---

## Changelog

- `RemovedComponents` now internally uses an `Events<RemovedComponentsEntity>` instead of an `Events<Entity>`
@bors bors bot changed the title Add a wrapper around Entity for RemovedComponents [Merged by Bors] - Add a wrapper around Entity for RemovedComponents Feb 5, 2023
@bors bors bot closed this Feb 5, 2023
@CatThingy CatThingy deleted the removed-component-wrapper branch February 5, 2023 21:19
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-Usability A targeted quality-of-life change that makes Bevy easier to use 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.

4 participants