mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
4b326fb4ca
# Objective - The function `BlobVec::replace_unchecked` has informal use of safety comments. - This function does strange things with `OwningPtr` in order to get around the borrow checker. ## Solution - Put safety comments in front of each unsafe operation. Describe the specific invariants of each operation and how they apply here. - Added a guard type `OnDrop`, which is used to simplify ownership transfer in case of a panic. --- ## Changelog + Added the guard type `bevy_utils::OnDrop`. + Added conversions from `Ptr`, `PtrMut`, and `OwningPtr` to `NonNull<u8>`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |