remove unnecessary mut in query in ui_texture_slice example (#12101)
# Objective Keep the examples as correct as possible: Remove mutability from a query that is unused ui_texture_slice ## Solution removed "mut" ---
This commit is contained in:
parent
972ca62831
commit
e689d46015
@ -14,10 +14,10 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn button_system(
|
fn button_system(
|
||||||
mut interaction_query: Query<(&Interaction, &Children), (Changed<Interaction>, With<Button>)>,
|
interaction_query: Query<(&Interaction, &Children), (Changed<Interaction>, With<Button>)>,
|
||||||
mut text_query: Query<&mut Text>,
|
mut text_query: Query<&mut Text>,
|
||||||
) {
|
) {
|
||||||
for (interaction, children) in &mut interaction_query {
|
for (interaction, children) in &interaction_query {
|
||||||
let mut text = text_query.get_mut(children[0]).unwrap();
|
let mut text = text_query.get_mut(children[0]).unwrap();
|
||||||
match *interaction {
|
match *interaction {
|
||||||
Interaction::Pressed => {
|
Interaction::Pressed => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user