Fix type shenanigans
This commit is contained in:
parent
cc71436187
commit
4d9c451de8
|
@ -124,15 +124,23 @@ const _: () = {
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn ::core::any::Any> {
|
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn ::core::any::Any> {
|
||||||
self
|
// this is changed
|
||||||
|
unsafe {
|
||||||
|
core::mem::transmute::<
|
||||||
|
::std::boxed::Box<Entity>,
|
||||||
|
::std::boxed::Box<bevy::ecs::entity::Entity>,
|
||||||
|
>(self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_any(&self) -> &dyn ::core::any::Any {
|
fn as_any(&self) -> &dyn ::core::any::Any {
|
||||||
self
|
// this is changed
|
||||||
|
unsafe { core::mem::transmute::<&Entity, &bevy::ecs::entity::Entity>(self) }
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_any_mut(&mut self) -> &mut dyn ::core::any::Any {
|
fn as_any_mut(&mut self) -> &mut dyn ::core::any::Any {
|
||||||
self
|
// this is changed
|
||||||
|
unsafe { core::mem::transmute::<&mut Entity, &mut bevy::ecs::entity::Entity>(self) }
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn into_reflect(
|
fn into_reflect(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use std::any::TypeId;
|
use std::any::TypeId;
|
||||||
|
|
||||||
use bevy::log::{debug, warn};
|
use bevy::log::{debug, info, warn};
|
||||||
use bevy::reflect::serde::ReflectDeserializer;
|
use bevy::reflect::serde::{ReflectDeserializer, ReflectSerializer};
|
||||||
use bevy::reflect::{GetTypeRegistration, Reflect, TypeRegistration, TypeRegistry};
|
use bevy::reflect::{GetTypeRegistration, Reflect, TypeRegistration, TypeRegistry};
|
||||||
use bevy::utils::HashMap;
|
use bevy::utils::HashMap;
|
||||||
use ron::Value;
|
use ron::Value;
|
||||||
|
|
Loading…
Reference in New Issue