Skip to content

Commit

Permalink
Update list_generic_family.rs
Browse files Browse the repository at this point in the history
Fix example 'list_generic_family.rs'. The rxbuf cannot contain zeros before receiving data. The buffer must be cleared. 

Signed-off-by: Bartosz Paczek <bartosz.paczek@intel.com>
  • Loading branch information
bpaczek-intel authored Oct 23, 2024
1 parent 865fe7c commit 0cb23f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/list_generic_family.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() {

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

let mut rxbuf = vec![0u8; 4096];
let mut rxbuf = Vec::with_capacity(4096);
let mut offset = 0;

'outer: loop {
Expand Down

0 comments on commit 0cb23f8

Please sign in to comment.