bevy/crates/bevy_ecs/src
Alice Cecile 52e5ad5da7
Don't show .to_bits in Display impl for Entity (#14011)
# Objective

#12469 changed the `Debug` impl for `Entity`, making sure it's actually
accurate for debugging. To ensure that its can still be readily logged
in error messages and inspectors, this PR added a more concise and
human-friendly `Display` impl.

However, users found this form too verbose: the `to_bits` information
was unhelpful and too long. Fixes #13980.

## Solution

- Don't include `Entity::to_bits` in the `Display` implementation for
`Entity`. This information can readily be accessed and logged for users
who need it.
- Also clean up the implementation of `Display` for `DebugName`,
introduced in https://github.com/bevyengine/bevy/pull/13760, to simply
use the new `Display` impl (since this was the desired format there).

## Testing

I've updated an existing test to verify the output of `Entity::display`.

---------

Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
2024-06-25 17:08:24 +00:00
..
entity Don't show .to_bits in Display impl for Entity (#14011) 2024-06-25 17:08:24 +00:00
event Mark events as read during EventReader::par_read (#13836) 2024-06-25 15:36:06 +00:00
identifier feat: Reflection implementations on Identifier (#13648) 2024-06-03 16:33:14 +00:00
observer Make Observer::with_event (and other variants) unsafe (#13954) 2024-06-21 18:31:01 +00:00
query Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
reflect Map entities from a resource when written to the world. (#13650) 2024-06-03 16:33:24 +00:00
schedule IntoSystemConfigs::chain_ignore_deferred's return type fix (#13919) 2024-06-18 22:21:58 +00:00
storage Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
system Change World::inspect_entity to return an Iterator instead of Vec (#13934) 2024-06-19 21:06:35 +00:00
world improved error message when forgetting to call system apply function … (#13975) 2024-06-25 12:27:15 +00:00
archetype.rs Update observer archetype flags for sparse components (#13886) 2024-06-17 15:15:30 +00:00
batching.rs Parallel event reader (#12554) 2024-04-22 16:37:42 +00:00
bundle.rs Use a unstable sort to sort component ids in bevy_ecs (#13789) 2024-06-17 14:56:19 +00:00
change_detection.rs Implement WorldQuery and QueryData on Mut. (#13338) 2024-05-14 12:38:31 +00:00
component.rs Fix typo in ComponentId docs: of -> or (#13932) 2024-06-19 18:51:47 +00:00
intern.rs Moves intern and label modules into bevy_ecs (#12772) 2024-04-08 15:34:11 +00:00
label.rs Add mappings to EntityMapper (#13727) 2024-06-08 12:52:23 +00:00
lib.rs Generalised ECS reactivity with Observers (#10839) 2024-06-15 01:33:26 +00:00
removal_detection.rs Remove extra call to clear_trackers (#13762) 2024-06-10 18:06:05 +00:00