diff options
author | 2023-02-09 17:24:23 +0100 | |
---|---|---|
committer | 2023-02-09 17:24:23 +0100 | |
commit | 99a27542a0b90653f4ab66076c11a6a9ae706a0d (patch) | |
tree | 2a45e08ea9266777c07edfe21e4896e7ae02a68a /src/lib.rs | |
parent | 74b04c7aae5fd7e73f4283774eab0ef72a26a8a7 (diff) | |
download | bytes-99a27542a0b90653f4ab66076c11a6a9ae706a0d.tar.gz bytes-99a27542a0b90653f4ab66076c11a6a9ae706a0d.tar.zst bytes-99a27542a0b90653f4ab66076c11a6a9ae706a0d.zip |
Add a safe way to create UninitSlice from slices (#598)
Introduce UninitSlice::from_slice and UninitSlice::from_uninit_slice
methods which safely create Uninit slice from provided slice of maybe
uninitialised or initialised memory.
In addition, add `From<&mut [T]>` implementations (for `T=u8` and
`T=MaybeUninit<u8>`) which do conversion from slice to UninitSlice.
Closes: #552
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions