diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-03-01 22:23:03 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-01 22:23:03 +0100 |
| commit | 206b4b597edabb0e4243d6bd847940b7ec415cfd (patch) | |
| tree | 66291ff8279ff564aa426a886d68daf67028432e | |
| parent | 351e4407ef2c726ce78638306a0ebcbdf580d72c (diff) | |
| parent | c0e40b887bf4975512cc40e13ea17cb57f34f099 (diff) | |
Merge pull request #1254 from davidedellagiustina/fix
FIx `PacketQueue::init()`
| -rw-r--r-- | embassy-stm32/src/eth/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/eth/mod.rs b/embassy-stm32/src/eth/mod.rs index b632861bf..e1d7a09b4 100644 --- a/embassy-stm32/src/eth/mod.rs +++ b/embassy-stm32/src/eth/mod.rs | |||
| @@ -44,7 +44,7 @@ impl<const TX: usize, const RX: usize> PacketQueue<TX, RX> { | |||
| 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 fn init(this: &mut MaybeUninit<Self>) { | 45 | pub fn init(this: &mut MaybeUninit<Self>) { |
| 46 | unsafe { | 46 | unsafe { |
| 47 | this.as_mut_ptr().write_bytes(0u8, core::mem::size_of::<Self>()); | 47 | this.as_mut_ptr().write_bytes(0u8, 1); |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
| 50 | } | 50 | } |
