-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add methods for reading into unitialized buffers #944
Conversation
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
The overall shape here looks good! If, in the future, the standard library adopts some convention for uninitialized buffers, we can follow it. What would you think about making the doc comments for these new |
Signed-off-by: John Nunley <dev@notgull.net>
I did this. I left behind the header explaining which syscall it corresponds to. |
@sunfishcode When do you think that you'll be able to review this? I want to implement |
Sounds good! I'll merge this, do some additional testing, and then cut a new release. |
This is now released in rustix 0.38.27. |
An alternative to #908 that uses separate functions to enable reading into uninitialized bytes.
So far I've added uninitialized methods for
io
methods,net
methods, andrand
. There are other functions that take&mut [u8]
, but those aren't as pressing for now.cc #81