mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 11:33:06 +00:00
15be0d1a61
# 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> |
||
---|---|---|
.. | ||
entity_ref.rs | ||
error.rs | ||
identifier.rs | ||
mod.rs | ||
spawn_batch.rs | ||
unsafe_world_cell.rs | ||
world_cell.rs |