-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add panicking helpers for getting components from Query
#9659
Add panicking helpers for getting components from Query
#9659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Query
like for resources. Partially addresses Add panicking versions ofget_component
andget
#9443.Solution
Changelog
Added
Query::component
andQuery::component_mut
to get specific component from query and panic on error.