From e582d45df9266361b427a6a7660bf2afa8a48d43 Mon Sep 17 00:00:00 2001 From: Robert Dodd Date: Wed, 3 Jan 2024 08:50:29 +1100 Subject: [PATCH] Remove unnecessary clones --- src/apply_mutations.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/apply_mutations.rs b/src/apply_mutations.rs index 489d0b4..5d6f209 100644 --- a/src/apply_mutations.rs +++ b/src/apply_mutations.rs @@ -360,14 +360,14 @@ impl BevyTemplateNode { .spawn(( NodeBundle { style: style.style.clone(), - border_color: style.border_color.clone(), - background_color: style.background_color.clone(), - transform: style.transform.clone(), - visibility: style.visibility.clone(), - z_index: style.z_index.clone(), + border_color: style.border_color, + background_color: style.background_color, + transform: style.transform, + visibility: style.visibility, + z_index: style.z_index, ..default() }, - style.outline.clone(), + style.outline, )) .push_children(&children) .id() @@ -383,20 +383,20 @@ impl BevyTemplateNode { .collect::>(); world .spawn(NodeBundle { - border_color: style.border_color.clone(), + border_color: style.border_color, ..default() }) .insert(( TextBundle { text: text.clone(), style: style.style.clone(), - background_color: style.background_color.clone(), - transform: style.transform.clone(), - visibility: style.visibility.clone(), - z_index: style.z_index.clone(), + background_color: style.background_color, + transform: style.transform, + visibility: style.visibility, + z_index: style.z_index, ..default() }, - style.outline.clone(), + style.outline, )) .push_children(&children) .id() @@ -412,20 +412,20 @@ impl BevyTemplateNode { .collect::>(); world .spawn(NodeBundle { - border_color: style.border_color.clone(), + border_color: style.border_color, ..default() }) .insert(( ImageBundle { image: image.clone(), style: style.style.clone(), - background_color: style.background_color.clone(), - transform: style.transform.clone(), - visibility: style.visibility.clone(), - z_index: style.z_index.clone(), + background_color: style.background_color, + transform: style.transform, + visibility: style.visibility, + z_index: style.z_index, ..default() }, - style.outline.clone(), + style.outline, )) .push_children(&children) .id()