mirror of
https://github.com/bevyengine/bevy
synced 2024-12-22 11:03:06 +00:00
1974723a63
# Objective - (Partially) Fixes #9904 - Acts on #9910 ## Solution - Deprecated the relevant methods from `Query`, cascading changes as required across Bevy. --- ## Changelog - Deprecated `QueryState::get_component_unchecked_mut` method - Deprecated `Query::get_component` method - Deprecated `Query::get_component_mut` method - Deprecated `Query::component` method - Deprecated `Query::component_mut` method - Deprecated `Query::get_component_unchecked_mut` method ## Migration Guide ### `QueryState::get_component_unchecked_mut` Use `QueryState::get_unchecked_manual` and select for the exact component based on the structure of the exact query as required. ### `Query::(get_)component(_unchecked)(_mut)` Use `Query::get` and select for the exact component based on the structure of the exact query as required. - For mutable access (`_mut`), use `Query::get_mut` - For unchecked access (`_unchecked`), use `Query::get_unchecked` - For panic variants (non-`get_`), add `.unwrap()` ## Notes - `QueryComponentError` can be removed once these deprecated methods are also removed. Due to an interaction with `thiserror`'s derive macro, it is not marked as deprecated. |
||
---|---|---|
.. | ||
entity_ref_mut_lifetime_safety.rs | ||
entity_ref_mut_lifetime_safety.stderr | ||
query_exact_sized_iterator_safety.rs | ||
query_exact_sized_iterator_safety.stderr | ||
query_iter_combinations_mut_iterator_safety.rs | ||
query_iter_combinations_mut_iterator_safety.stderr | ||
query_iter_many_mut_iterator_safety.rs | ||
query_iter_many_mut_iterator_safety.stderr | ||
query_lifetime_safety.rs | ||
query_lifetime_safety.stderr | ||
query_to_readonly.rs | ||
query_to_readonly.stderr | ||
query_transmute_safety.rs | ||
query_transmute_safety.stderr | ||
system_param_derive_readonly.rs | ||
system_param_derive_readonly.stderr | ||
system_query_get_lifetime_safety.rs | ||
system_query_get_lifetime_safety.stderr | ||
system_query_get_many_lifetime_safety.rs | ||
system_query_get_many_lifetime_safety.stderr | ||
system_query_get_many_mut_lifetime_safety.rs | ||
system_query_get_many_mut_lifetime_safety.stderr | ||
system_query_iter_lifetime_safety.rs | ||
system_query_iter_lifetime_safety.stderr | ||
system_query_iter_many_mut_lifetime_safety.rs | ||
system_query_iter_many_mut_lifetime_safety.stderr | ||
system_query_set_get_lifetime_safety.rs | ||
system_query_set_get_lifetime_safety.stderr | ||
system_query_set_iter_lifetime_safety.rs | ||
system_query_set_iter_lifetime_safety.stderr | ||
system_state_get_lifetime_safety.rs | ||
system_state_get_lifetime_safety.stderr | ||
system_state_iter_lifetime_safety.rs | ||
system_state_iter_lifetime_safety.stderr | ||
system_state_iter_mut_overlap_safety.rs | ||
system_state_iter_mut_overlap_safety.stderr | ||
world_query_derive.rs | ||
world_query_derive.stderr |