bevy/crates
Andreas Monitzer 000c362de0
Include ReflectFromReflect in all dynamic data types. (#17453)
# Objective

Fixes #17416

## Solution

I just included ReflectFromReflect in all macros and implementations. I
think this should be ok, at least it compiles properly and does fix the
errors in my test code.

## Testing

I generated a DynamicMap and tried to convert it into a concrete
`HashMap` as a `Box<dyn Reflect>`. Without my fix, it doesn't work,
because this line panics:

```rust
let rfr = ty.data::<ReflectFromReflect>().unwrap();
```

where `ty` is the `TypeRegistration` for the (matching) `HashMap`.

I don't know why `ReflectFromReflect` wasn't included everywhere, I
assume that it was an oversight and not an architecture decision I'm not
aware of.

# Migration Guide

The hasher in reflected `HashMap`s and `HashSet`s now have to implement
`Default`. This is the case for the ones provided by Bevy already, and
is generally a sensible thing to do.
2025-01-20 22:08:24 +00:00
..
bevy_a11y Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_animation Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
bevy_app Diagnostics for label traits (#17441) 2025-01-20 21:51:26 +00:00
bevy_asset Switch bevy_asset to core::prelude (#17442) 2025-01-20 04:14:48 +00:00
bevy_audio Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
bevy_color Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_core_pipeline Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_derive Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_dev_tools Rename TargetCamera to UiTargetCamera (#17403) 2025-01-19 19:56:57 +00:00
bevy_diagnostic Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_dylib Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_ecs Add DefaultQueryFilters (#13120) 2025-01-20 21:57:39 +00:00
bevy_encase_derive Bump Version after Release (#17176) 2025-01-06 00:04:44 +00:00
bevy_gilrs Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_gizmos Reworked Segment types into their cartesian forms (#17404) 2025-01-19 03:54:45 +00:00
bevy_gltf Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_image Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_input Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_input_focus Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_internal Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_log Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_macro_utils Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_math Reworked Segment types into their cartesian forms (#17404) 2025-01-19 03:54:45 +00:00
bevy_mesh Expose a few primitive builders, which seemed to be missed? (#17454) 2025-01-20 21:29:38 +00:00
bevy_mikktspace Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_pbr Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_picking Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_platform_support Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_ptr Update safety docs for Ptr::assert_unique (#17394) 2025-01-16 03:25:19 +00:00
bevy_reflect Include ReflectFromReflect in all dynamic data types. (#17453) 2025-01-20 22:08:24 +00:00
bevy_remote Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
bevy_render Diagnostics for label traits (#17441) 2025-01-20 21:51:26 +00:00
bevy_scene Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_sprite Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_state Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_tasks Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_text Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00
bevy_time Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_transform Relationships (non-fragmenting, one-to-many) (#17398) 2025-01-18 22:20:30 +00:00
bevy_ui Fixing ui antialiasing clamp call parameters order (#14970) (#17456) 2025-01-20 21:31:20 +00:00
bevy_utils Create bevy_platform_support Crate (#17250) 2025-01-20 20:45:30 +00:00
bevy_window Move #![warn(clippy::allow_attributes, clippy::allow_attributes_without_reason)] to the workspace Cargo.toml (#17374) 2025-01-15 01:14:58 +00:00
bevy_winit Support non-Vec data structures in relations (#17447) 2025-01-20 21:26:08 +00:00