From 623687e59baa21c23c2c854b1815cb29e9c5917e Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 10 Jan 2025 09:01:23 +0300 Subject: Fix new Clippy warnings --- src/ipc/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipc') diff --git a/src/ipc/server.rs b/src/ipc/server.rs index 8828ab1a..f8b661e1 100644 --- a/src/ipc/server.rs +++ b/src/ipc/server.rs @@ -523,7 +523,7 @@ impl State { } // Check if this workspace became active. - let is_active = mon.map_or(false, |mon| mon.active_workspace_idx() == ws_idx); + let is_active = mon.is_some_and(|mon| mon.active_workspace_idx() == ws_idx); if is_active && !ipc_ws.is_active { events.push(Event::WorkspaceActivated { id, focused: false }); } @@ -546,7 +546,7 @@ impl State { idx: u8::try_from(ws_idx + 1).unwrap_or(u8::MAX), name: ws.name().cloned(), output: mon.map(|mon| mon.output_name().clone()), - is_active: mon.map_or(false, |mon| mon.active_workspace_idx() == ws_idx), + is_active: mon.is_some_and(|mon| mon.active_workspace_idx() == ws_idx), is_focused: Some(id) == focused_ws_id, active_window_id: ws.active_window().map(|win| win.id().get()), } -- cgit