bevy/crates/bevy_ecs/src/world
Jakob Hellermann 008c156991 refactor: move internals from entity_ref to World, add SAFETY comments (#6402)
# Objective

There are some utility functions for actually working with `Storages` inside `entity_ref.rs` that are used both for `EntityRef/EntityMut` and `World`, with a `// TODO: move to Storages`.
This PR moves them to private methods on `World`, because that's the safest API boundary. On `Storages` you would need to ensure that you pass `Components` from the same world.

## Solution

- move get_component[_with_type], get_ticks[_with_type], get_component_and_ticks[_with_type] to `World` (still pub(crate))
- replace `pub use entity_ref::*;` with `pub use entity_ref::{EntityRef, EntityMut}` and qualified `entity_ref::get_mut[_by_id]` in `world.rs`
- add safety comments to a bunch of methods
2023-01-13 16:50:26 +00:00
..
entity_ref.rs refactor: move internals from entity_ref to World, add SAFETY comments (#6402) 2023-01-13 16:50:26 +00:00
identifier.rs Implement SparseSetIndex for WorldId (#7125) 2023-01-09 21:43:27 +00:00
mod.rs refactor: move internals from entity_ref to World, add SAFETY comments (#6402) 2023-01-13 16:50:26 +00:00
spawn_batch.rs add more SAFETY comments and lint for missing ones in bevy_ecs (#4835) 2022-07-04 14:44:24 +00:00
world_cell.rs Panic on dropping NonSend in non-origin thread. (#6534) 2023-01-09 20:40:34 +00:00