Skip to content

Commit

Permalink
Apply clippy suggestion (prevents ICE)
Browse files Browse the repository at this point in the history
ICE was fixed in the meantime, this addresses the problem until next stable release.
  • Loading branch information
Bromeon committed Apr 6, 2024
1 parent a4319cc commit 54677d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdnative-core/src/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl<T: GodotObject> Ref<T, Unique> {
// 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::<sys::godot_object>())?;
<T::Memory as MemorySpec>::impl_from_maybe_ref_counted(ptr)
}
}
Expand Down

0 comments on commit 54677d3

Please sign in to comment.