Skip to content

Commit ea13679

Browse files
committed
review: then
1 parent fbc6a4f commit ea13679

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

crates/bevy_ui/src/focus.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,7 @@ pub fn ui_focus_system(
100100
MouseButton::Right => ClickedWith::MouseRightButton,
101101
MouseButton::Other(button) => ClickedWith::MouseOtherButton(*button),
102102
})
103-
.or_else(|| {
104-
if touches_input.just_released(0) {
105-
Some(ClickedWith::Touch)
106-
} else {
107-
None
108-
}
109-
});
103+
.or_else(|| touches_input.just_released(0).then(|| ClickedWith::Touch));
110104

111105
let mut moused_over_z_sorted_nodes = node_query
112106
.iter_mut()

0 commit comments

Comments
 (0)