Skip to content

Commit 9810324

Browse files
authored
Flatten nested if in mouse_cursor using if let chains
1 parent ecfd7ac commit 9810324

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

core/src/display_object/movie_clip.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3177,13 +3177,13 @@ impl<'gc> TInteractiveObject<'gc> for MovieClip<'gc> {
31773177
// The nearest button-mode ancestor governs the cursor, so stop at the first one.
31783178
let mut current: Option<DisplayObject<'gc>> = Some(self.into());
31793179
while let Some(obj) = current {
3180-
if let Some(mc) = obj.as_movie_clip() {
3181-
if mc.is_button_mode(context) {
3182-
if mc.use_hand_cursor(context) && mc.enabled(context) {
3183-
return MouseCursor::Hand;
3184-
}
3185-
break;
3180+
if let Some(mc) = obj.as_movie_clip()
3181+
&& mc.is_button_mode(context)
3182+
{
3183+
if mc.use_hand_cursor(context) && mc.enabled(context) {
3184+
return MouseCursor::Hand;
31863185
}
3186+
break;
31873187
}
31883188
current = obj.parent();
31893189
}

0 commit comments

Comments
 (0)