diff --git a/examples/ecs/component_hooks.rs b/examples/ecs/component_hooks.rs index 8e04d02364b13..a2d33b8c1b12a 100644 --- a/examples/ecs/component_hooks.rs +++ b/examples/ecs/component_hooks.rs @@ -75,7 +75,9 @@ fn setup(world: &mut World) { let value = world.get::(entity).unwrap().0; println!( "{component_id:?} added to {entity:?} with value {value:?}{}", - caller.map(|location| format!("due to {location}").unwrap_or_default()) + caller + .map(|location| format!("due to {location}")) + .unwrap_or_default() ); // Or access resources world @@ -102,7 +104,9 @@ fn setup(world: &mut World) { let value = world.get::(entity).unwrap().0; println!( "{component_id:?} removed from {entity:?} with value {value:?}{}", - caller.map(|location| format!("due to {location}").unwrap_or_default()) + caller + .map(|location| format!("due to {location}")) + .unwrap_or_default() ); // You can also issue commands through `.commands()` world.commands().entity(entity).despawn();