Skip to content

Commit a5aa5c0

Browse files
bpaczek-intelJohnTitor
authored andcommitted
Update list_generic_family.rs
Fix example 'list_generic_family.rs'. The rxbuf cannot contain zeros before receiving data. The buffer must be cleared. Signed-off-by: Bartosz Paczek <[email protected]>
1 parent 8d56f06 commit a5aa5c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/list_generic_family.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828

2929
socket.send(&txbuf, 0).unwrap();
3030

31-
let mut rxbuf = vec![0u8; 4096];
31+
let mut rxbuf = Vec::with_capacity(4096);
3232
let mut offset = 0;
3333

3434
'outer: loop {

0 commit comments

Comments
 (0)