From 54677d39bcdfa8881b5957c6337f34cfe30c673e Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sat, 6 Apr 2024 20:49:37 +0200 Subject: [PATCH] Apply clippy suggestion (prevents ICE) ICE was fixed in the meantime, this addresses the problem until next stable release. --- gdnative-core/src/object/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdnative-core/src/object/mod.rs b/gdnative-core/src/object/mod.rs index 2c1a92336..6219839a8 100644 --- a/gdnative-core/src/object/mod.rs +++ b/gdnative-core/src/object/mod.rs @@ -355,7 +355,7 @@ impl Ref { // Classes with NUL-bytes in their names can not exist let class_name = CString::new(class_name).ok()?; let ctor = (get_api().godot_get_class_constructor)(class_name.as_ptr())?; - let ptr = NonNull::new(ctor() as *mut sys::godot_object)?; + let ptr = NonNull::new(ctor().cast::())?; ::impl_from_maybe_ref_counted(ptr) } }