From 0e9a7c067c2516c748564a3469c36c9c5b75a9f0 Mon Sep 17 00:00:00 2001 From: Alexander Mohr Date: Sun, 1 Jun 2025 10:47:56 +0200 Subject: [PATCH] fix clippy --- worf/src/lib/gui.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/worf/src/lib/gui.rs b/worf/src/lib/gui.rs index a79eefd..71fa76f 100644 --- a/worf/src/lib/gui.rs +++ b/worf/src/lib/gui.rs @@ -1173,7 +1173,7 @@ fn window_show_resize(config: &Config, ui: &Rc let target_height = if let Some(lines) = config.lines() { Some(calculate_row_height(ui, lines, config)) } else if config.dynamic_lines() { - Some(calculate_dynamic_lines_window_height(&config, ui, geometry)) + Some(calculate_dynamic_lines_window_height(config, ui, geometry)) } else if let Some(height) = percent_or_absolute(&config.height(), geometry.height()) { Some(height) } else { @@ -1205,14 +1205,10 @@ fn calculate_dynamic_lines_window_height( fn get_monitor_geometry(ui: &UiElements) -> Option { // Get the surface and associated monitor geometry - let Some(surface) = ui.window.surface() else { - return None; - }; + let surface = ui.window.surface()?; let display = surface.display(); - let Some(monitor) = display.monitor_at_surface(&surface) else { - return None; - }; + let monitor = display.monitor_at_surface(&surface)?; let geometry = monitor.geometry(); Some(geometry) }