diff options
| author | sodiboo <git@sodi.boo> | 2024-09-26 14:34:01 +0200 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-10-05 22:26:47 -0700 |
| commit | b9fd0a405e1b15398c2f84e66ff5b2f47744d6bc (patch) | |
| tree | a22bd14d7780ef9f74491f5561220b43df99ea3f /src/layout/workspace.rs | |
| parent | 1b44e0cd20b532a440bb571e4b823c95ac3e31fd (diff) | |
| download | niri-b9fd0a405e1b15398c2f84e66ff5b2f47744d6bc.tar.gz niri-b9fd0a405e1b15398c2f84e66ff5b2f47744d6bc.tar.bz2 niri-b9fd0a405e1b15398c2f84e66ff5b2f47744d6bc.zip | |
use `if let Some()` over `match` with `None => ()`
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 11 |
1 files changed, 4 insertions, 7 deletions
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<W: LayoutElement> Column<W> { } 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 { |
