diff --git a/examples/app/log_layers_ecs.rs b/examples/app/log_layers_ecs.rs index 55e57081ff..bcf5e5571e 100644 --- a/examples/app/log_layers_ecs.rs +++ b/examples/app/log_layers_ecs.rs @@ -150,13 +150,16 @@ fn print_logs( commands.entity(root_entity).with_children(|child| { for event in events.read() { - child.spawn(Text::default()).with_children(|child| { - child.spawn(( - TextSpan::new(format!("{:5} ", event.level)), - TextColor(level_color(&event.level)), - )); - child.spawn(TextSpan::new(&event.message)); - }); + child.spawn(( + Text::default(), + children![ + ( + TextSpan::new(format!("{:5} ", event.level)), + TextColor(level_color(&event.level)), + ), + TextSpan::new(&event.message), + ], + )); } }); }