Skip to content

Commit 7f1e952

Browse files
committed
Remove usage of unstable stdlib features
1 parent ca50b98 commit 7f1e952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/php/types/object.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,15 @@ impl<T> Handlers<T> {
300300
self.check_uninit();
301301

302302
// SAFETY: `check_uninit` guarantees that the handlers have been initialized.
303-
unsafe { self.handlers.assume_init_ref() }
303+
unsafe { &*self.handlers.as_ptr() }
304304
}
305305

306306
/// Checks if the handlers have been initialized, and initializes them if they have not been.
307307
fn check_uninit(&self) {
308308
if !self.init.load(Ordering::Acquire) {
309309
// SAFETY: Memory location has been initialized therefore given pointer is valid.
310310
unsafe {
311-
ZendObjectHandlers::init::<T>(std::mem::transmute(self.handlers.assume_init_ref()));
311+
ZendObjectHandlers::init::<T>(self.handlers.as_ptr() as *mut _);
312312
};
313313
self.init.store(true, Ordering::Release);
314314
}

0 commit comments

Comments
 (0)