Skip to content

Commit

Permalink
remove unnecessary mut in query in ui_texture_slice example (#12101)
Browse files Browse the repository at this point in the history
# Objective

Keep the examples as correct as possible: Remove mutability from a query
that is unused ui_texture_slice

## Solution

removed "mut"

---
  • Loading branch information
rmsthebest authored Feb 24, 2024
1 parent 972ca62 commit e689d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ui/ui_texture_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ fn main() {
}

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>,
) {
for (interaction, children) in &mut interaction_query {
for (interaction, children) in &interaction_query {
let mut text = text_query.get_mut(children[0]).unwrap();
match *interaction {
Interaction::Pressed => {
Expand Down

0 comments on commit e689d46

Please sign in to comment.