aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-04-08 15:18:26 +0530
committerRoopesh Chander <roop@roopc.net>2019-04-09 11:25:04 +0530
commitd9e88c51bd17240b79cadda50cca541b76d52dd6 (patch)
tree192af7b5f42ee1cade4482dd198a6c7aeba0bccf /WireGuard/Shared/Model
parentwireguard-go-bridge: version bump to new tag (diff)
downloadwireguard-apple-d9e88c51bd17240b79cadda50cca541b76d52dd6.tar.xz
wireguard-apple-d9e88c51bd17240b79cadda50cca541b76d52dd6.zip
Swift 5 migration: Fix switch warnings
We now get a warning when switching over enums from system frameworks even when we handle all public cases because there can be future cases that aren't handled. When such a future case is introduced, we'll get a warning. Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/Shared/Model')
-rw-r--r--WireGuard/Shared/Model/Endpoint.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/WireGuard/Shared/Model/Endpoint.swift b/WireGuard/Shared/Model/Endpoint.swift
index c3286496..ac016496 100644
--- a/WireGuard/Shared/Model/Endpoint.swift
+++ b/WireGuard/Shared/Model/Endpoint.swift
@@ -36,6 +36,8 @@ extension Endpoint {
return "\(address):\(port)"
case .ipv6(let address):
return "[\(address)]:\(port)"
+ @unknown default:
+ fatalError()
}
}
@@ -78,6 +80,8 @@ extension Endpoint {
return true
case .ipv6:
return true
+ @unknown default:
+ fatalError()
}
}
@@ -89,6 +93,8 @@ extension Endpoint {
return nil
case .ipv6:
return nil
+ @unknown default:
+ fatalError()
}
}
}