aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-12-09 14:35:21 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-12-09 14:35:21 +0100
commitd4fd17cd8f5b6d2b756d96a898a8b40d2ba3de9c (patch)
tree4dc8cbe676c4067bcf321e6eab4f335f4396976c /Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
parentWireGuardKitGo: get rid of missing -Wno-unused-command-line-argument flag (diff)
downloadwireguard-apple-d4fd17cd8f5b6d2b756d96a898a8b40d2ba3de9c.tar.xz
wireguard-apple-d4fd17cd8f5b6d2b756d96a898a8b40d2ba3de9c.zip
global: fix remaining swiftlint violations
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift')
-rw-r--r--Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift b/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
index 1e21490..9efe1fa 100644
--- a/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
+++ b/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift
@@ -31,7 +31,7 @@ class PacketTunnelSettingsGenerator {
switch result {
case .success(.some(let endpoint)):
- if case .name(_, _) = endpoint.host { assert(false, "Endpoint is not resolved") }
+ if case .name = endpoint.host { assert(false, "Endpoint is not resolved") }
wgSettings.append("endpoint=\(endpoint.stringRepresentation)\n")
case .success(.none):
break
@@ -58,7 +58,7 @@ class PacketTunnelSettingsGenerator {
wgSettings.append("preshared_key=\(preSharedKey)\n")
}
if let endpoint = try? resolvedEndpoints[index]?.withReresolvedIP() {
- if case .name(_, _) = endpoint.host { assert(false, "Endpoint is not resolved") }
+ if case .name = endpoint.host { assert(false, "Endpoint is not resolved") }
wgSettings.append("endpoint=\(endpoint.stringRepresentation)\n")
}
let persistentKeepAlive = peer.persistentKeepAlive ?? 0