From b9fd0a405e1b15398c2f84e66ff5b2f47744d6bc Mon Sep 17 00:00:00 2001 From: sodiboo Date: Thu, 26 Sep 2024 14:34:01 +0200 Subject: use `if let Some()` over `match` with `None => ()` --- src/layout/workspace.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/layout') diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 54ddd3db..179055ae 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -3102,14 +3102,11 @@ impl Column { } pub fn advance_animations(&mut self, current_time: Duration) { - match &mut self.move_animation { - Some(anim) => { - anim.set_current_time(current_time); - if anim.is_done() { - self.move_animation = None; - } + if let Some(anim) = &mut self.move_animation { + anim.set_current_time(current_time); + if anim.is_done() { + self.move_animation = None; } - None => (), } for tile in &mut self.tiles { -- cgit