Make QueryState::as_nop pub(crate) #12752
Labels
A-ECS
Entities, components, systems, and events
C-Code-Quality
A section of code that is hard to understand or change
D-Trivial
Nice and easy! A great choice to get started with Bevy
Rationale
QueryState::as_nop
is currently only used in two places:QueryState::is_empty
(throughQueryState::is_empty_unsafe_world_cell
)Query::contains
.Looking at the method's signature:
It's not really usable by consumers because it returns a non-
mut
reference, while a majority ofQueryState
methods require&mut self
.As for the
NopWorldQuery
higher-order WorldQuery, there are outside users of that, so it should be kept public.What solution would you like?
Make
as_nop
pub(crate)
:What alternative(s) have you considered?
Leave it public.
Additional context
Originally brought up on discord:
The text was updated successfully, but these errors were encountered: