From fbc17877b1b8d2c21449d06cff50059e950ad5f1 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 15 Oct 2022 22:29:29 +0200 Subject: [PATCH] Suppress buggy Xcode warnings @discardableResult annotations became suddenly ineffective. --- Passepartout/App/Intents/IntentDispatcher+Activities.swift | 4 ++-- .../Sources/PassepartoutVPN/Managers/VPNManager+Actions.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Passepartout/App/Intents/IntentDispatcher+Activities.swift b/Passepartout/App/Intents/IntentDispatcher+Activities.swift index 9e88660e..321231c4 100644 --- a/Passepartout/App/Intents/IntentDispatcher+Activities.swift +++ b/Passepartout/App/Intents/IntentDispatcher+Activities.swift @@ -75,7 +75,7 @@ extension IntentDispatcher { } Task { do { - try await vpnManager.connect(with: profileId) + _ = try await vpnManager.connect(with: profileId) } catch { pp_log.error("Unable to connect with profile \(profileId): \(error)") } @@ -104,7 +104,7 @@ extension IntentDispatcher { } Task { do { - try await vpnManager.connect(with: profileId, toServer: newServerId) + _ = try await vpnManager.connect(with: profileId, toServer: newServerId) } catch { pp_log.error("Unable to connect with profile \(profileId): \(error)") } diff --git a/PassepartoutLibrary/Sources/PassepartoutVPN/Managers/VPNManager+Actions.swift b/PassepartoutLibrary/Sources/PassepartoutVPN/Managers/VPNManager+Actions.swift index 1c908019..9830ef66 100644 --- a/PassepartoutLibrary/Sources/PassepartoutVPN/Managers/VPNManager+Actions.swift +++ b/PassepartoutLibrary/Sources/PassepartoutVPN/Managers/VPNManager+Actions.swift @@ -42,9 +42,9 @@ extension VPNManager { return } if let newServerId = newServerId { - try await connect(with: profileId, toServer: newServerId) + _ = try await connect(with: profileId, toServer: newServerId) } else { - try await connect(with: profileId) + _ = try await connect(with: profileId) } }