Add panicking helpers for getting components from Query#9659
Add panicking helpers for getting components from Query#9659alice-i-cecile merged 2 commits intobevyengine:mainfrom
Query#9659Conversation
alice-i-cecile
left a comment
There was a problem hiding this comment.
The "See also" section of the docs should point to the non-panicking equivalents, and vice versa :)
Currently we points from mut functions to non-mut equivalents. I can add pointing to non-panicking equivalents, but it will be 2 additional functions (mut and non-mut one). So should I point to 3 other functions? |
|
I would point to the adjacent functions in the panicking/mutability grid :) So each should reference two other methods. |
|
@alice-i-cecile makes sense, done! |
|
@Shatur, thinking about this a bit more, this should also exist on |
|
@alice-i-cecile hm... I don't see |
|
Separate issue to add them then please :) |
|
@alice-i-cecile done: #9683 |
…#9659) # Objective - Currently we don't have panicking alternative for getting components from `Query` like for resources. Partially addresses bevyengine#9443. ## Solution - Add these functions. --- ## Changelog ### Added - `Query::component` and `Query::component_mut` to get specific component from query and panic on error.
Objective
Querylike for resources. Partially addresses Add panicking versions ofget_componentandget#9443.Solution
Changelog
Added
Query::componentandQuery::component_mutto get specific component from query and panic on error.