Skip to content

Commit a110c17

Browse files
Fix clippy error in nightly - useless transmute
1 parent b93571e commit a110c17

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/builders/class.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,13 @@ impl ClassBuilder {
257257
}
258258

259259
for iface in self.interfaces {
260-
unsafe { zend_do_implement_interface(class, std::mem::transmute(iface)) };
260+
unsafe {
261+
zend_do_implement_interface(
262+
class,
263+
iface as *const crate::ffi::_zend_class_entry
264+
as *mut crate::ffi::_zend_class_entry,
265+
)
266+
};
261267
}
262268

263269
for (name, mut default, flags) in self.properties {

src/types/callable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl<'a> ZendCallable<'a> {
115115
let result = unsafe {
116116
_call_user_function_impl(
117117
std::ptr::null_mut(),
118-
std::mem::transmute(self.0.as_ref()),
118+
self.0.as_ref() as *const crate::ffi::_zval_struct as *mut crate::ffi::_zval_struct,
119119
&mut retval,
120120
len as _,
121121
packed.as_ptr() as *mut _,

0 commit comments

Comments
 (0)