Skip to content

Commit

Permalink
use Display for entity id in log_components (#14164)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
  • Loading branch information
hymm and janhohenheim authored Jul 8, 2024
1 parent 91dd7e6 commit 33ea3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>(
Expand Down

0 comments on commit 33ea3b9

Please sign in to comment.