bevy/crates/bevy_core/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
..
lib.rs bevy_core: Derive useful traits on FrameCount (#13291) 2024-05-10 10:00:08 +00:00
name.rs Don't show .to_bits in Display impl for Entity (#14011) 2024-06-25 17:08:24 +00:00
serde.rs bevy_core: Derive useful traits on FrameCount (#13291) 2024-05-10 10:00:08 +00:00
task_pool_options.rs Fix beta lints (#12980) 2024-04-16 02:46:46 +00:00