diff options
Diffstat (limited to 'src/ipc/server.rs')
| -rw-r--r-- | src/ipc/server.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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()), } |
