Skip to content

Commit

Permalink
use if let instead of iterating over Option
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrgani authored and not-fl3 committed Sep 6, 2024
1 parent 2af0393 commit 7af524b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ impl Ui {
return true;
}
}
for window in &self.modal {
if let Some(window) = &self.modal {
if window.was_active {
if window.full_rect().contains(mouse_position) {
return true;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ impl Ui {
window.childs.clear();
}

for window in &mut self.modal {
if let Some(window) = &mut self.modal {
window.painter.clear();
window.cursor.reset();
window.was_active = window.active;
Expand Down

0 comments on commit 7af524b

Please sign in to comment.