Skip to content

Commit

Permalink
Merge pull request NiklasEi#20 from AltF02/clone-patch-1
Browse files Browse the repository at this point in the history
Remove `.clone()` from `button_colors.*`
  • Loading branch information
NiklasEi authored Jan 23, 2022
2 parents 293917f + 8d7638a commit 15fb309
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn setup_menu(
align_items: AlignItems::Center,
..Default::default()
},
color: button_colors.normal.clone(),
color: button_colors.normal,
..Default::default()
})
.insert(PlayButton)
Expand Down Expand Up @@ -88,10 +88,10 @@ fn click_play_button(
state.set(GameState::Playing).unwrap();
}
Interaction::Hovered => {
*color = button_colors.hovered.clone();
*color = button_colors.hovered;
}
Interaction::None => {
*color = button_colors.normal.clone();
*color = button_colors.normal;
}
}
}
Expand Down

0 comments on commit 15fb309

Please sign in to comment.