Skip to content

Commit

Permalink
Replace incorrect usage of .next_back() with .is_empty()
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-blackbird committed Feb 2, 2023
1 parent e505d30 commit fc152b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_ui/src/flex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ pub fn flex_node_system(
}
}

if scale_factor_events.iter().next_back().is_some() || ui_scale.is_changed() {
if !scale_factor_events.is_empty() || ui_scale.is_changed() {
scale_factor_events.clear();
update_changed(&mut flex_surface, scale_factor, full_node_query);
} else {
update_changed(&mut flex_surface, scale_factor, node_query);
Expand Down

0 comments on commit fc152b8

Please sign in to comment.