bevy/crates/bevy_ecs/src/system
Boxy 5c680a38a7 Move all logic to UnsafeWorldCell (#7381)
# Objective

- Implementing logic used by system params and `UnsafeWorldCell` on `&World` is sus since `&World` generally denotes shared read only access to world but this is a lie in the above situations. Move most/all logic that uses `&World` to mean `UnsafeWorldCell` onto `UnsafeWorldCell`
-  Add a way to take a `&mut World` out of `UnsafeWorldCell` and use this in `WorldCell`'s `Drop` impl instead of a `UnsafeCell` field

---

## Changelog

- changed some `UnsafeWorldCell` methods to take `self` instead of `&self`/`&mut self` since there is literally no point to them doing that
- `UnsafeWorldCell::world` is now used to get immutable access to the whole world instead of just the metadata which can now be done via `UnsafeWorldCell::world_metadata`
- `UnsafeWorldCell::world_mut` now exists and can be used to get a `&mut World` out of `UnsafeWorldCell`
- removed `UnsafeWorldCell::storages` since that is probably unsound since storages contains the actual component/resource data not just metadata

## Migration guide

N/A none of the breaking changes here make any difference for a 0.9->0.10 transition since `UnsafeWorldCell` did not exist in 0.9
2023-02-06 19:02:52 +00:00
..
commands Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
exclusive_function_system.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
exclusive_system_param.rs Remove ExclusiveSystemParam::apply (#7489) 2023-02-04 00:25:09 +00:00
function_system.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
mod.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
query.rs add UnsafeWorldCell abstraction (#6404) 2023-01-27 00:12:13 +00:00
system.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
system_param.rs Move all logic to UnsafeWorldCell (#7381) 2023-02-06 19:02:52 +00:00
system_piping.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00