Skip to content

Commit 535164f

Browse files
committed
Remove last use of mem::uninitialized
1 parent 3973e7e commit 535164f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/control_pipe.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use core::cmp::min;
2-
use core::mem;
32
use crate::{Result, UsbDirection, UsbError};
43
use crate::bus::UsbBus;
54
use crate::control::Request;
@@ -44,7 +43,7 @@ impl<B: UsbBus> ControlPipe<'_, B> {
4443
ep_out,
4544
ep_in,
4645
state: ControlState::Idle,
47-
buf: unsafe { mem::uninitialized() },
46+
buf: [0; CONTROL_BUF_LEN],
4847
static_in_buf: None,
4948
i: 0,
5049
len: 0,

0 commit comments

Comments
 (0)