From c905843da3f919dee905ed01ee077917f9880827 Mon Sep 17 00:00:00 2001 From: Anselmo Sampietro Date: Thu, 23 Feb 2023 11:41:48 +0100 Subject: [PATCH] use .to_string() instead of format --- examples/ecs/apply_system_buffers.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/ecs/apply_system_buffers.rs b/examples/ecs/apply_system_buffers.rs index 4d300a3f1c0819..31763d2a6bb4ec 100644 --- a/examples/ecs/apply_system_buffers.rs +++ b/examples/ecs/apply_system_buffers.rs @@ -70,7 +70,7 @@ fn setup(mut commands: Commands, asset_server: Res) { .with_children(|parent| { parent.spawn(( TextBundle::from_section( - format!("Apple: nothing counted yet"), + "Apple: nothing counted yet".to_string(), TextStyle { font: asset_server.load("fonts/FiraSans-Bold.ttf"), font_size: 80.0, @@ -81,7 +81,7 @@ fn setup(mut commands: Commands, asset_server: Res) { )); parent.spawn(( TextBundle::from_section( - format!("Orange: nothing counted yet"), + "Orange: nothing counted yet".to_string(), TextStyle { font: asset_server.load("fonts/FiraSans-Bold.ttf"), font_size: 80.0, @@ -139,9 +139,9 @@ fn count_apple( if timers.repeating.just_finished() { let mut apples_text = apple_count.single_mut(); apples_text.sections[0].value = if apple.is_empty() { - format!("Apple: not counted") + "Apple: not counted".to_string() } else { - format!("Apple: counted") + "Apple: counted".to_string() }; } } @@ -162,9 +162,9 @@ fn count_orange( if timers.repeating.just_finished() { let mut oranges_text = orange_count.single_mut(); oranges_text.sections[0].value = if orange.is_empty() { - format!("Orange: not counted") + "Orange: not counted".to_string() } else { - format!("Orange: counted") + "Orange: counted".to_string() }; } }