Skip to content

[Merged by Bors] - Fix panic on is_resource_* calls (#2828) - #2863

Closed
dixonwille wants to merge 1 commit into
bevyengine:mainfrom
dixonwille:bug/is_resource-panic
Closed

dixonwille wants to merge 1 commit into
bevyengine:mainfrom
dixonwille:bug/is_resource-panic

Conversation

@dixonwille

Copy link
Copy Markdown
Contributor

Changed out unwraps to use if let syntax instead. Returning false when None.

Also modified an existing test to encompass these methods

This PR fixes #2828

Changed out unwraps to use if let syntax instead. Returning false when None.

Also modified an existing test to encompass these methods

This PR fixes #2828
@github-actions github-actions Bot added the S-Needs-Triage This issue needs to be labelled label Sep 24, 2021
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change S-Needs-Review and removed S-Needs-Triage This issue needs to be labelled labels Sep 24, 2021
@cart

cart commented Sep 24, 2021

Copy link
Copy Markdown
Member

Very good call!

@cart

cart commented Sep 24, 2021

Copy link
Copy Markdown
Member

bors r+

bors Bot pushed a commit that referenced this pull request Sep 24, 2021
Changed out unwraps to use if let syntax instead. Returning false when None.

Also modified an existing test to encompass these methods

This PR fixes #2828
@bors bors Bot changed the title Fix panic on is_resource_* calls (#2828) [Merged by Bors] - Fix panic on is_resource_* calls (#2828) Sep 24, 2021
@bors bors Bot closed this Sep 24, 2021
@dixonwille
dixonwille deleted the bug/is_resource-panic branch September 24, 2021 21:22
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-Bug An unexpected or incorrect behavior C-Code-Quality A section of code that is hard to understand or change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

app.world().is_resource_added::<T>() panics instead of returning false

3 participants