diff --git a/src/serde_bin.rs b/src/serde_bin.rs index 4e389fb..74f47c7 100644 --- a/src/serde_bin.rs +++ b/src/serde_bin.rs @@ -439,7 +439,7 @@ where // waiting for array_assume_init or core::array::map optimizations // https://github.com/rust-lang/rust/issues/61956 - Ok(unsafe { (&*(&to as *const _ as *const MaybeUninit<_>)).assume_init_read() }) + Ok(unsafe { (*(&to as *const _ as *const MaybeUninit<_>)).assume_init_read() }) } } diff --git a/src/serde_ron.rs b/src/serde_ron.rs index 2f6db47..16e4567 100644 --- a/src/serde_ron.rs +++ b/src/serde_ron.rs @@ -1056,7 +1056,7 @@ where // https://github.com/rust-lang/rust/issues/61956 // initializing before block close so that drop will run automatically if err encountered there let initialized = - unsafe { (&*(&to as *const _ as *const MaybeUninit<_>)).assume_init_read() }; + unsafe { (*(&to as *const _ as *const MaybeUninit<_>)).assume_init_read() }; o.paren_close(d)?; Ok(initialized)