Skip to content

Commit

Permalink
core: fuzz: MaybeUninit::write_slice was renamed to copy_from_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-hamester committed Apr 2, 2024
1 parent 832e748 commit 3376c3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/fuzz/fuzz_targets/packetizer_spare_capacity_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ fuzz_target!(|data: Vec<Vec<u8>>| {
let dst = packetizer.spare_capacity_mut();
let to_write = rem.min(dst.len());

MaybeUninit::write_slice(&mut dst[..to_write], &data[len - rem..len - rem + to_write]);
MaybeUninit::copy_from_slice(
&mut dst[..to_write],
&data[len - rem..len - rem + to_write],
);

rem -= to_write;
unsafe {
packetizer.bytes_written(to_write);
Expand Down

0 comments on commit 3376c3c

Please sign in to comment.