mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
impl Reflect
for EntityHashSet
(#12971)
`EntityHashSet` doesn't seem to implement `Reflect` which seems weird! Especially since `EntityHashMap` implements `Reflect`. This PR just added an extra `impl_reflect_value!` for `EntityHashSet` and this seems to do the trick. I left out doing the same for `StableHashSet` since it's marked as deprecated. --- I'm really wondering what was the issue here. If anyone can explain why `EntityHashSet` can't use the `Reflect` impl of `bevy_utils::HashSet` similar to how it's the case with the `...HashMap`s I'd be interested!
This commit is contained in:
parent
7b8d502083
commit
2532447dcb
1 changed files with 5 additions and 2 deletions
|
@ -102,7 +102,7 @@ impl_reflect_value!(
|
|||
);
|
||||
impl_reflect_value!(::std::collections::BTreeSet<T: Ord + Eq + Clone + Send + Sync>());
|
||||
impl_reflect_value!(::std::collections::HashSet<T: Hash + Eq + Clone + Send + Sync, S: TypePath + Clone + Send + Sync>());
|
||||
impl_reflect_value!(::bevy_utils::HashSet<T: Hash + Eq + Clone + Send + Sync>());
|
||||
impl_reflect_value!(::bevy_utils::hashbrown::HashSet<T: Hash + Eq + Clone + Send + Sync, S: TypePath + Clone + Send + Sync>());
|
||||
impl_reflect_value!(::core::ops::Range<T: Clone + Send + Sync>());
|
||||
impl_reflect_value!(::core::ops::RangeInclusive<T: Clone + Send + Sync>());
|
||||
impl_reflect_value!(::core::ops::RangeFrom<T: Clone + Send + Sync>());
|
||||
|
@ -220,6 +220,10 @@ impl_reflect_value!(::std::ffi::OsString(
|
|||
impl_reflect_value!(::std::ffi::OsString(Debug, Hash, PartialEq));
|
||||
impl_reflect_value!(::alloc::collections::BinaryHeap<T: Clone>);
|
||||
|
||||
impl_type_path!(::bevy_utils::NoOpHash);
|
||||
impl_type_path!(::bevy_utils::EntityHash);
|
||||
impl_type_path!(::bevy_utils::FixedState);
|
||||
|
||||
macro_rules! impl_reflect_for_veclike {
|
||||
($ty:path, $insert:expr, $remove:expr, $push:expr, $pop:expr, $sub:ty) => {
|
||||
impl<T: FromReflect + TypePath + GetTypeRegistration> List for $ty {
|
||||
|
@ -629,7 +633,6 @@ impl_type_path!(::std::collections::HashMap<K, V, S>);
|
|||
|
||||
impl_reflect_for_hashmap!(bevy_utils::hashbrown::HashMap<K, V, S>);
|
||||
impl_type_path!(::bevy_utils::hashbrown::hash_map::DefaultHashBuilder);
|
||||
impl_type_path!(::bevy_utils::NoOpHash);
|
||||
impl_type_path!(::bevy_utils::hashbrown::HashMap<K, V, S>);
|
||||
|
||||
impl<K, V> Map for ::std::collections::BTreeMap<K, V>
|
||||
|
|
Loading…
Reference in a new issue