bevy/crates
0xc0001a2040 15be0d1a61
Add/fix track_caller attribute on panicking entity accessor methods (#8951)
# Objective

`World::entity`, `World::entity_mut` and `Commands::entity` should be
marked with `track_caller` to display where (in user code) the call with
the invalid `Entity` was made. `Commands::entity` already has the
attibute, but it does nothing due to the call to `unwrap_or_else`.

## Solution

- Apply the `track_caller` attribute to the `World::entity_mut` and
`World::entity`.
- Remove the call to `unwrap_or_else` which makes the `track_caller`
attribute useless (because `unwrap_or_else` is not `track_caller`
itself). The avoid eager evaluation of the panicking branch it is never
inlined.

---------

Co-authored-by: Giacomo Stevanato <giaco.stevanato@gmail.com>
2023-06-26 18:35:11 +00:00
..
bevy_a11y Require #[derive(Event)] on all Events (#7086) 2023-06-06 14:44:32 +00:00
bevy_animation Add morph targets (#8158) 2023-06-22 20:00:01 +00:00
bevy_app Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_asset Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_audio Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_core Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_core_pipeline Bias texture mipmaps (#7614) 2023-06-22 20:55:05 +00:00
bevy_derive bevy_derive: Add #[deref] attribute (#8552) 2023-05-16 18:29:09 +00:00
bevy_diagnostic Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_dylib Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
bevy_dynamic_plugin Remove stray boilerplate line in bevy_dynamic_plugin/Cargo.toml (#8830) 2023-06-12 19:10:48 +00:00
bevy_ecs Add/fix track_caller attribute on panicking entity accessor methods (#8951) 2023-06-26 18:35:11 +00:00
bevy_ecs_compile_fail_tests Resolve clippy issues for rust 1.70.0 (#8738) 2023-06-01 21:05:05 +00:00
bevy_encase_derive update syn, encase, glam and hexasphere (#8573) 2023-05-16 01:24:17 +00:00
bevy_gilrs Add gamepad rumble support to bevy_input (#8398) 2023-04-24 15:28:53 +00:00
bevy_gizmos Use AHash to get color from entity in bevy_gizmos (#8960) 2023-06-26 16:38:31 +00:00
bevy_gltf Add morph targets (#8158) 2023-06-22 20:00:01 +00:00
bevy_hierarchy Change despawn_descendants to return &mut Self (#8928) 2023-06-23 02:08:13 +00:00
bevy_input Add get_unclamped to Axis (#8871) 2023-06-19 23:06:11 +00:00
bevy_internal Instanced line rendering for gizmos based on bevy_polyline (#8427) 2023-06-13 06:49:47 +00:00
bevy_log log to stderr instead of stdout (#8886) 2023-06-19 23:36:02 +00:00
bevy_macro_utils update syn, encase, glam and hexasphere (#8573) 2023-05-16 01:24:17 +00:00
bevy_macros_compile_fail_tests bevy_derive: Add #[deref] attribute (#8552) 2023-05-16 18:29:09 +00:00
bevy_math Add integer equivalents for Rect (#7984) 2023-06-12 19:10:48 +00:00
bevy_mikktspace update syn, encase, glam and hexasphere (#8573) 2023-05-16 01:24:17 +00:00
bevy_pbr Bias texture mipmaps (#7614) 2023-06-22 20:55:05 +00:00
bevy_ptr Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
bevy_reflect Reflect UUID (#8905) 2023-06-21 17:24:32 +00:00
bevy_reflect_compile_fail_tests reflect: stable type path v2 (#7184) 2023-06-05 20:31:20 +00:00
bevy_render Bias texture mipmaps (#7614) 2023-06-22 20:55:05 +00:00
bevy_scene Move AppTypeRegistry to bevy_ecs (#8901) 2023-06-21 17:25:01 +00:00
bevy_sprite Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_tasks remove some use of once_cell that can be replace with new std (#8739) 2023-06-01 21:55:18 +00:00
bevy_text NoWrap Text feature (#8947) 2023-06-26 16:23:00 +00:00
bevy_time Hide naga info logs & Derive PartialEq on Timer and Stopwatch (#8664) 2023-05-24 15:16:15 +00:00
bevy_transform Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
bevy_ui NoWrap Text feature (#8947) 2023-06-26 16:23:00 +00:00
bevy_utils Bump hashbrown to 0.14 (#8904) 2023-06-21 13:04:44 +00:00
bevy_window Update and improve Window Documentation (#8858) 2023-06-22 03:00:40 +00:00
bevy_winit Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00