bevy/crates/bevy_ecs/src/query
Zachary Harrold 4c6b6fc24a
Moved get_component(_unchecked_mut) from Query to QueryState (#9686)
# Objective

- Fixes #9683

## Solution

- Moved `get_component` from `Query` to `QueryState`.
- Moved `get_component_unchecked_mut` from `Query` to `QueryState`.
- Moved `QueryComponentError` from `bevy_ecs::system` to
`bevy_ecs::query`. Minor Breaking Change.
- Narrowed scope of `unsafe` blocks in `Query` methods.

---

## Migration Guide

- `use bevy_ecs::system::QueryComponentError;` -> `use
bevy_ecs::query::QueryComponentError;`

## Notes

I am not very familiar with unsafe Rust nor its use within Bevy, so I
may have committed a Rust faux pas during the migration.

---------

Co-authored-by: Zac Harrold <zharrold@c5prosolutions.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
2023-09-11 19:04:22 +00:00
..
access.rs Allow disjoint mutable world access via EntityMut (#9419) 2023-08-28 23:30:59 +00:00
error.rs Moved get_component(_unchecked_mut) from Query to QueryState (#9686) 2023-09-11 19:04:22 +00:00
fetch.rs Allow disjoint mutable world access via EntityMut (#9419) 2023-08-28 23:30:59 +00:00
filter.rs Fix safety invariants for WorldQuery::fetch and simplify cloning (#8246) 2023-07-25 21:16:22 +00:00
iter.rs Fix safety invariants for WorldQuery::fetch and simplify cloning (#8246) 2023-07-25 21:16:22 +00:00
mod.rs Moved get_component(_unchecked_mut) from Query to QueryState (#9686) 2023-09-11 19:04:22 +00:00
par_iter.rs Simplify parallel iteration methods (#8854) 2023-07-23 11:09:24 +00:00
state.rs Moved get_component(_unchecked_mut) from Query to QueryState (#9686) 2023-09-11 19:04:22 +00:00