diff options
author | 2019-10-24 14:40:45 -0700 | |
---|---|---|
committer | 2019-10-24 14:40:45 -0700 | |
commit | 2ac72333fa2a7c2e50bf68c4db998bcd7f493415 (patch) | |
tree | 61cddc535df536e119780fcf1f3529167c400653 /tests/fuzz_bytes.rs | |
parent | fe2183dc2fa126e81c8af23f7096a1fcb05d6d1a (diff) | |
download | bytes-2ac72333fa2a7c2e50bf68c4db998bcd7f493415.tar.gz bytes-2ac72333fa2a7c2e50bf68c4db998bcd7f493415.tar.zst bytes-2ac72333fa2a7c2e50bf68c4db998bcd7f493415.zip |
Change BufMut methods that expose maybe-uninitialized bytes (#305)
- The return type of `BufMut::bytes_mut` is now
`&mut [MaybeUninit<u8>]`.
- The argument type of `BufMut::bytes_vectored_mut` is now
`&mut [bytes::buf::IoSliceMut]`.
- `bytes::buf::IoSliceMut` is a `repr(transparent)` wrapper around an
`std::io::IoSliceMut`, but does not expose the inner bytes with a safe
API, since they might be uninitialized.
- `BufMut::bytesMut` and `BufMut::bytes_vectored_mut` are no longer
`unsafe fn`, since the types encapsulate the unsafety instead.
Diffstat (limited to 'tests/fuzz_bytes.rs')
0 files changed, 0 insertions, 0 deletions