From 168816253de8b579cc728b5b7069705ffa3da13e Mon Sep 17 00:00:00 2001 From: krejcif Date: Mon, 26 Jan 2026 17:45:49 +0100 Subject: [PATCH] fix(macos): use if-expression for conditional assignment SwiftFormat requires if/switch expressions for property assignment. Co-Authored-By: Claude Opus 4.5 --- apps/macos/Sources/Clawdbot/AppState.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/macos/Sources/Clawdbot/AppState.swift b/apps/macos/Sources/Clawdbot/AppState.swift index 6ccb83369..b6096ab06 100644 --- a/apps/macos/Sources/Clawdbot/AppState.swift +++ b/apps/macos/Sources/Clawdbot/AppState.swift @@ -418,11 +418,10 @@ final class AppState { let trimmedUser = parsed.user?.trimmingCharacters(in: .whitespacesAndNewlines) let user = (trimmedUser?.isEmpty ?? true) ? nil : trimmedUser let port = parsed.port - let assembled: String - if let user { - assembled = port == 22 ? "\(user)@\(host)" : "\(user)@\(host):\(port)" + let assembled = if let user { + port == 22 ? "\(user)@\(host)" : "\(user)@\(host):\(port)" } else { - assembled = port == 22 ? host : "\(host):\(port)" + port == 22 ? host : "\(host):\(port)" } if assembled != self.remoteTarget { self.remoteTarget = assembled