Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor function update_accessibility_nodes #10911

Merged
merged 11 commits into from
Dec 10, 2023
Prev Previous commit
Next Next commit
Inline should_run variable
  • Loading branch information
Nilirad committed Dec 8, 2023
commit 4879add15b1c724ffc68b754acb4d51b32aeabc5
4 changes: 1 addition & 3 deletions crates/bevy_winit/src/accessibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ fn update_accessibility_nodes(
let Some(adapter) = adapters.get(&primary_window_id) else {
return;
};
// TODO: Inline variable
let should_run = focus.is_changed() || !nodes.is_empty();
if should_run {
if focus.is_changed() || !nodes.is_empty() {
// TODO: Extract into function
adapter.update_if_active(|| {
let mut to_update = vec![];
Expand Down