aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard
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/WireGuard
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/WireGuard')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelStatus.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelStatus.swift b/WireGuard/WireGuard/Tunnel/TunnelStatus.swift
index 61c9e27..547aa9f 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelStatus.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelStatus.swift
@@ -27,6 +27,8 @@ import NetworkExtension
self = .reasserting
case .invalid:
self = .inactive
+ @unknown default:
+ fatalError()
}
}
}
@@ -54,6 +56,8 @@ extension NEVPNStatus: CustomDebugStringConvertible {
case .disconnecting: return "disconnecting"
case .reasserting: return "reasserting"
case .invalid: return "invalid"
+ @unknown default:
+ fatalError()
}
}
}