We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548edb4 commit 66ed6b0Copy full SHA for 66ed6b0
src/sys/unix.rs
@@ -2708,11 +2708,7 @@ impl crate::Socket {
2708
payload.as_mut_ptr().cast(),
2709
&mut len,
2710
))
2711
- .map(|_| {
2712
- let buf = &payload[..len as usize];
2713
- // TODO: use `MaybeUninit::slice_assume_init_ref` once stable.
2714
- unsafe { &*(buf as *const [u8]) }.into()
2715
- })
+ .map(|_| payload[..len as usize].to_vec())
2716
}
2717
2718
/// Set the value of the `TCP_CONGESTION` option for this socket.
0 commit comments