use Display for entity id in log_components (#14164)

# Objective

- Cleanup a doubled `Entity` in log components

```
// Before
2024-07-05T19:54:09.082773Z  INFO bevy_ecs::system::commands: Entity Entity { index: 2, generation: 1 }: ["bevy_transform::components::transform::Transform"]

// After
2024-07-05T19:54:09.082773Z  INFO bevy_ecs::system::commands: Entity 2v1: ["bevy_transform::components::transform::Transform"]
```

---------

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
This commit is contained in:
Mike 2024-07-07 18:03:27 -07:00 committed by GitHub
parent 91dd7e6f0f
commit 33ea3b9f7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1308,7 +1308,7 @@ fn log_components(entity: Entity, world: &mut World) {
.inspect_entity(entity)
.map(ComponentInfo::name)
.collect();
info!("Entity {:?}: {:?}", entity, debug_infos);
info!("Entity {entity}: {debug_infos:?}");
}
fn observe<E: Event, B: Bundle, M>(