Fix clippy error in nightly - useless transmute

This commit is contained in:
Tobias Bengtsson 2022-06-07 09:54:11 +02:00
parent b93571e377
commit a110c1710c
2 changed files with 8 additions and 2 deletions

View File

@ -257,7 +257,13 @@ impl ClassBuilder {
} }
for iface in self.interfaces { for iface in self.interfaces {
unsafe { zend_do_implement_interface(class, std::mem::transmute(iface)) }; unsafe {
zend_do_implement_interface(
class,
iface as *const crate::ffi::_zend_class_entry
as *mut crate::ffi::_zend_class_entry,
)
};
} }
for (name, mut default, flags) in self.properties { for (name, mut default, flags) in self.properties {

View File

@ -115,7 +115,7 @@ impl<'a> ZendCallable<'a> {
let result = unsafe { let result = unsafe {
_call_user_function_impl( _call_user_function_impl(
std::ptr::null_mut(), std::ptr::null_mut(),
std::mem::transmute(self.0.as_ref()), self.0.as_ref() as *const crate::ffi::_zval_struct as *mut crate::ffi::_zval_struct,
&mut retval, &mut retval,
len as _, len as _,
packed.as_ptr() as *mut _, packed.as_ptr() as *mut _,