aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/eth/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-stm32/src/eth/mod.rs b/embassy-stm32/src/eth/mod.rs
index 89d2c5a3d..b632861bf 100644
--- a/embassy-stm32/src/eth/mod.rs
+++ b/embassy-stm32/src/eth/mod.rs
@@ -42,8 +42,10 @@ impl<const TX: usize, const RX: usize> PacketQueue<TX, RX> {
42 } 42 }
43 43
44 // Allow to initialize a Self without requiring it to go on the stack 44 // Allow to initialize a Self without requiring it to go on the stack
45 pub unsafe fn init(this: &mut MaybeUninit<Self>) { 45 pub fn init(this: &mut MaybeUninit<Self>) {
46 this.as_mut_ptr().write_bytes(0u8, core::mem::size_of::<Self>()); 46 unsafe {
47 this.as_mut_ptr().write_bytes(0u8, core::mem::size_of::<Self>());
48 }
47 } 49 }
48} 50}
49 51