bevy/crates
James Liu a4ed1b88b8
Relax BufferVec's type constraints (#12866)
# Objective
Since BufferVec was first introduced, `bytemuck` has added additional
traits with fewer restrictions than `Pod`. Within BufferVec, we only
rely on the constraints of `bytemuck::cast_slice` to a `u8` slice, which
now only requires `T: NoUninit` which is a strict superset of `Pod`
types.

## Solution
Change out the `Pod` generic type constraint with `NoUninit`. Also
taking the opportunity to substitute `cast_slice` with
`must_cast_slice`, which avoids a runtime panic in place of a compile
time failure if `T` cannot be used.

---

## Changelog
Changed: `BufferVec` now supports working with types containing
`NoUninit` but not `Pod` members.
Changed: `BufferVec` will now fail to compile if used with a type that
cannot be safely read from. Most notably, this includes ZSTs, which
would previously always panic at runtime.
2024-04-05 02:11:41 +00:00
..
bevy_a11y Set the logo and favicon for all of Bevy's published crates (#12696) 2024-03-25 18:52:50 +00:00
bevy_animation Move FloatOrd into bevy_math (#12732) 2024-03-27 18:30:11 +00:00
bevy_app Remove stepping from default features (#12847) 2024-04-03 19:16:02 +00:00
bevy_asset Error info has been added to LoadState::Failed (#12709) 2024-04-04 14:04:27 +00:00
bevy_audio updated audio_source.rs documentation (#12765) 2024-03-28 19:10:09 +00:00
bevy_color Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
bevy_core Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_core_pipeline Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_derive Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_dev_tools remove close_on_esc (#12859) 2024-04-03 18:02:50 +00:00
bevy_diagnostic Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_dylib Set the logo and favicon for all of Bevy's published crates (#12696) 2024-03-25 18:52:50 +00:00
bevy_dynamic_plugin Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_ecs Cluster small table/archetype into single Task in parallel iteration (#12846) 2024-04-04 07:09:26 +00:00
bevy_ecs_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_encase_derive Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_gilrs Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_gizmos Changed the order of arguments for the Arc gizmo docs (#12854) 2024-04-03 01:46:20 +00:00
bevy_gltf Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_hierarchy Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_input fix previous_position / previous_force being discarded too early (#12556) 2024-04-01 21:45:47 +00:00
bevy_internal Fix ambiguities causing a crash (#12780) 2024-03-29 16:00:13 +00:00
bevy_log Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_macro_utils Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_macros_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_math Random sampling of directions and quaternions (#12857) 2024-04-04 23:13:00 +00:00
bevy_mikktspace Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_pbr Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
bevy_ptr Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_reflect Meshing for Annulus primitive (#12734) 2024-04-01 21:55:49 +00:00
bevy_reflect_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_render Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
bevy_scene Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_sprite Micro-optimize queue_material_meshes, primarily to remove bit manipulation. (#12791) 2024-04-01 21:58:53 +00:00
bevy_tasks Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_text Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_time Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
bevy_transform Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
bevy_ui [bevy_ui/layout] Update tests to get GlobalTransform properly (#12802) 2024-04-03 02:48:06 +00:00
bevy_utils Add repository field to bevy_utils_proc_macros (#12808) 2024-03-31 09:58:16 +00:00
bevy_window Move close_on_esc to bevy_dev_tools (#12855) 2024-04-03 01:29:06 +00:00
bevy_winit Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00