bevy/crates
ira 83a9e16158 Replace many_for_each_mut with iter_many_mut. (#5402)
# Objective
Replace `many_for_each_mut` with `iter_many_mut` using the same tricks to avoid aliased mutability that `iter_combinations_mut` uses.

<sub>I tried rebasing the draft PR I made for this before and it died. F</sub>
## Why
`many_for_each_mut` is worse for a few reasons:
1. The closure prevents the use of `continue`, `break`, and `return` behaves like a limited `continue`.
2. rustfmt will crumple it and double the indentation when the line gets too long.
    ```rust
    query.many_for_each_mut(
        &entity_list,
        |(mut transform, velocity, mut component_c)| {
            // Double trouble.
        },
    );
    ```
3. It is more surprising to have `many_for_each_mut` as a mutable counterpart to `iter_many` than `iter_many_mut`.
4. It required a separate unsafe fn; more unsafe code to maintain.
5. The `iter_many_mut` API matches the existing `iter_combinations_mut` API.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-07-30 01:38:13 +00:00
..
bevy_animation Update codebase to use IntoIterator where possible. (#5269) 2022-07-11 15:28:50 +00:00
bevy_app remove blanket Serialize + Deserialize requirement for Reflect on generic types (#5197) 2022-07-21 14:57:37 +00:00
bevy_asset Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bevy_audio Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bevy_core Export and register Mat2. (#5324) 2022-07-15 22:37:06 +00:00
bevy_core_pipeline update wgpu to 0.13 (#5168) 2022-07-14 21:17:16 +00:00
bevy_derive Add attribute to ignore fields of derived labels (#5366) 2022-07-19 05:21:19 +00:00
bevy_diagnostic Cleanups in diagnostics (#3871) 2022-06-20 17:02:25 +00:00
bevy_dylib Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_dynamic_plugin Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_ecs Replace many_for_each_mut with iter_many_mut. (#5402) 2022-07-30 01:38:13 +00:00
bevy_ecs_compile_fail_tests Replace many_for_each_mut with iter_many_mut. (#5402) 2022-07-30 01:38:13 +00:00
bevy_encase_derive Updated glam to 0.21. (#5142) 2022-07-03 19:55:33 +00:00
bevy_gilrs Improve Gamepad DPad Button Detection (#5220) 2022-07-11 14:11:25 +00:00
bevy_gltf Fix comment typo (#5421) 2022-07-22 15:04:32 +00:00
bevy_hierarchy Update codebase to use IntoIterator where possible. (#5269) 2022-07-11 15:28:50 +00:00
bevy_input Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bevy_internal Lighter no default features (#5447) 2022-07-25 15:48:14 +00:00
bevy_log Remove the dependency cycles (#5171) 2022-07-04 13:04:18 +00:00
bevy_macro_utils Derive AsBindGroup Improvements: Better errors, more options, update examples (#5364) 2022-07-19 22:05:43 +00:00
bevy_math Export and register Mat2. (#5324) 2022-07-15 22:37:06 +00:00
bevy_mikktspace Minimally fix the known unsoundness in bevy_mikktspace (#5299) 2022-07-16 08:37:18 +00:00
bevy_pbr Spotlight shadow bugfix (#5451) 2022-07-25 16:24:54 +00:00
bevy_ptr Fix OwningPtr docs (#5391) 2022-07-20 13:16:28 +00:00
bevy_reflect fix bevy_reflect README (#5477) 2022-07-29 20:01:51 +00:00
bevy_render Revert "Recalculate entity aabbs when meshes change (#4944)" (#5489) 2022-07-29 23:24:39 +00:00
bevy_scene Add VisibilityBundle and use it to fix gltfs, scenes, and examples (#5335) 2022-07-16 02:47:23 +00:00
bevy_sprite removed duplicated doc line in material.rs (#5405) 2022-07-20 21:39:51 +00:00
bevy_tasks Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
bevy_text text rendering: convert colours only once per section (#5474) 2022-07-28 13:34:56 +00:00
bevy_time Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bevy_transform Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bevy_ui text rendering: convert colours only once per section (#5474) 2022-07-28 13:34:56 +00:00
bevy_utils improve documentation for macro-generated label types (#5367) 2022-07-20 19:39:42 +00:00
bevy_window Fix comment typo (#5421) 2022-07-22 15:04:32 +00:00
bevy_winit Change window position types from tuple to vec (#5276) 2022-07-11 14:36:23 +00:00