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 François
parent c6b80c5664
commit 7ed1f6a9b6
No known key found for this signature in database

View file

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