Closed
Description
Starting in version 0.4.0 there's no safe way to pass a &mut [u8]
into recv_from, since RecvFrom takes &mut [MaybeUninitialized<u8>]
and rustc does not understand if the library potentially writes uninitalized bytes to the buffer.
Would it be possible to return the signature of the function to the way it was in 0.3.0 so that we can safely call recv_from? Perhaps a recv_from_uninitialized_with_options would be something useful for hyper-tuned applications.
Currently the only way I can see to interact with recv_from when I have a &mut [u8] is to use transmute, which is very difficult to pass code review with and difficult to reason about.
Metadata
Metadata
Assignees
Labels
No labels