-
Notifications
You must be signed in to change notification settings - Fork 270
Closed
Description
Lines 409 to 414 in c93cdcc
/// Normally casting a `&mut [u8]` to `&mut [MaybeUninit<u8>]` would be | |
/// unsound, as that allows us to write uninitialised bytes to the buffer. | |
/// However this implementation promises to not write uninitialised bytes to | |
/// the `buf`fer and passes it directly to `recv(2)` system call. This | |
/// promise ensures that this function can be called using a `buf`fer of | |
/// type `&mut [u8]`. |
A friendly question: because of the above promise, is it true that this API could change its signature to accept buf: &mut [u8]
? That will be so much helpful! (The current API is useless for many code bases where unsafe
is not allowed / or strongly discouraged).
(I noticed open issues like #366 , but it seems being there more than 1 year, when will it happen?) I'm a user of this crate and I think this current signature is really unnecessary hurdle for its users.
Metadata
Metadata
Assignees
Labels
No labels