Nit fixes.

This commit is contained in:
Andrew Baldwin 2025-02-21 20:39:59 -08:00
parent 9cba92f57f
commit 7916a9c227

View file

@ -285,15 +285,15 @@ pub fn is_focused(target: Id) -> impl Operation<bool> {
_bounds: Rectangle, _bounds: Rectangle,
operate_on_children: &mut dyn FnMut(&mut dyn Operation<bool>), operate_on_children: &mut dyn FnMut(&mut dyn Operation<bool>),
) { ) {
if self.is_focused.is_some() {
return;
}
operate_on_children(self); operate_on_children(self);
} }
fn finish(&self) -> Outcome<bool> { fn finish(&self) -> Outcome<bool> {
if let Some(is_focused) = &self.is_focused { self.is_focused.map_or(Outcome::None, Outcome::Some)
Outcome::Some(*is_focused)
} else {
Outcome::None
}
} }
} }