Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information