Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimize safety hazards in
slice_as_uninit[_mut]
.
In each function, explicitly use the implicit conversion of `&[T]` to `*const T`/`&mut [T]` to `* mut T` to eliminate one `as *const T`/`as *mut T` respectively. Instead of relying on the remaining cast in each function being valid for all `T`, reduce the scope of the assumption to `u8`, and add a TODO avoid eliminating the use of the assumption.
- Loading branch information