diff options
| -rw-r--r-- | engine-reflection/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engine-reflection/src/lib.rs b/engine-reflection/src/lib.rs index 3451442..ce770e9 100644 --- a/engine-reflection/src/lib.rs +++ b/engine-reflection/src/lib.rs @@ -3,7 +3,6 @@ use std::any::{type_name, Any, TypeId}; use std::borrow::Cow; use std::ffi::c_void; use std::fmt::Debug; -use std::ptr::NonNull; /// Trait implemented by types that support runtime reflection on them. /// @@ -91,7 +90,7 @@ impl Type } #[inline] - pub fn cast_dyn_any(&self, ptr: NonNull<c_void>) -> Option<NonNull<dyn Any>> + pub fn cast_dyn_any(&self, ptr: *mut c_void) -> Option<*mut dyn Any> { match self { Self::Struct(struct_type) => Some((struct_type.cast_dyn_any)(ptr)), @@ -470,4 +469,4 @@ impl<Value: Debug> Debug for FnWithDebug<Value> type DefaultValueFn = fn() -> Box<dyn Any>; -type CastDynAnyFn = fn(NonNull<c_void>) -> NonNull<dyn Any>; +type CastDynAnyFn = fn(*mut c_void) -> *mut dyn Any; |
