Skip to content
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

Change BufMut methods that expose maybe-uninitialized bytes #305

Merged
merged 1 commit into from Oct 24, 2019

Commits on Oct 23, 2019

  1. Change BufMut methods that expose maybe-uninitialized bytes

    - 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.
    seanmonstar committed Oct 23, 2019
    Copy the full SHA
    bb029de View commit details
    Browse the repository at this point in the history