bevy/crates/bevy_ecs/src/reflect
Chris Russell 0ea46663b0
Use map_unchanged in reflection instead of creating a Mut manually. (#14692)
# Objective

The code to create `ReflectComponent` and `ReflectResource` instances
manually constructs a `Mut<dyn Reflect>` by copying everything but
`value`. That can be done more concisely and better respecting
encapsulation by calling the `map_unchanged()` method.

## Solution

Use `map_unchanged` instead of creating a `Mut` manually.

---------

Co-authored-by: radiish <cb.setho@gmail.com>
2024-08-15 14:26:57 +00:00
..
bundle.rs reflect: implement the unique reflect rfc (#7207) 2024-08-12 17:01:41 +00:00
component.rs Use map_unchanged in reflection instead of creating a Mut manually. (#14692) 2024-08-15 14:26:57 +00:00
entity_commands.rs reflect: implement the unique reflect rfc (#7207) 2024-08-12 17:01:41 +00:00
from_world.rs fix some typos (#12038) 2024-02-22 18:55:22 +00:00
map_entities.rs Map entities from a resource when written to the world. (#13650) 2024-06-03 16:33:24 +00:00
mod.rs reflect: implement the unique reflect rfc (#7207) 2024-08-12 17:01:41 +00:00
resource.rs Use map_unchanged in reflection instead of creating a Mut manually. (#14692) 2024-08-15 14:26:57 +00:00