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] - Move safe operations out of unsafe blocks in Query #7851

Closed
wants to merge 1 commit into from

Conversation

JoJoJet
Copy link
Member

@JoJoJet JoJoJet commented Feb 28, 2023

Objective

Several Query methods unnecessarily place the call to Query::update_archetypes inside of unsafe blocks.

Solution

Move the method calls out of the unsafe blocks.

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

bors r+

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

Several `Query` methods unnecessarily place the call to `Query::update_archetypes` inside of unsafe blocks.

## Solution

Move the method calls out of the unsafe blocks.
@bors bors bot changed the title Move safe operations out of unsafe blocks in Query [Merged by Bors] - Move safe operations out of unsafe blocks in Query Feb 28, 2023
@bors bors bot closed this Feb 28, 2023
@JoJoJet JoJoJet deleted the break-up-unsafe branch February 28, 2023 18:17
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
# Objective

Several `Query` methods unnecessarily place the call to `Query::update_archetypes` inside of unsafe blocks.

## Solution

Move the method calls out of the unsafe blocks.
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 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.

3 participants