bevy/crates/bevy_ptr
JoJoJet f219a08907
Simplify Clone for ThinSlicePtr (#8247)
# Objective

The type `ThinSlicePtr` has a manual implementation of `Clone` that
manually clones each field. Since this type implements `Copy`, we can
change this implementation to simply dereference `&self`.
2023-03-30 10:22:09 +00:00
..
src Simplify Clone for ThinSlicePtr (#8247) 2023-03-30 10:22:09 +00:00
Cargo.toml chore: Release (#7920) 2023-03-06 05:13:36 +00:00
README.md bevy_ptr standalone crate (#4653) 2022-05-04 19:16:10 +00:00

bevy_ptr

The bevy_ptr crate provides low-level abstractions for working with pointers in a more safe way than using rust's raw pointers.

Rust has lifetimed and typed references (&'a T), unlifetimed and typed references (*const T), but no lifetimed but untyped references. bevy_ptr adds them, called Ptr<'a>, PtrMut<'a> and OwningPtr<'a>. These types are lifetime-checked so can never lead to problems like use-after-frees and must always point to valid data.