bevy/crates/bevy_ptr
Tygyh 63d17e8494
Simplify equality assertions (#10988)
# Objective

- Shorten assertions.

## Solution

- Replace '==' assertions with 'assert_eq()' and '!=' assertions with
'assert_ne()' .
2023-12-16 23:58:41 +00:00
..
src Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
Cargo.toml Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
README.md add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00

Bevy Ptr

License Crates.io Downloads Docs Discord

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.