aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-15 04:42:11 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-15 04:42:46 +0100
commit1e9c806614d944b689ed910d0f15679913869535 (patch)
tree77a6c4edfe34fc2ff6cb8dbf8c1edc53f31a9903
parentKeyValueCells now share code (diff)
downloadwireguard-apple-1e9c806614d944b689ed910d0f15679913869535.tar.xz
wireguard-apple-1e9c806614d944b689ed910d0f15679913869535.zip
Fix confusing indentation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift4
1 files changed, 1 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index d542f986..7e19bb75 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -64,9 +64,7 @@ class TunnelViewModel {
scratchpad[field] = stringValue
}
if field == .privateKey {
- if (stringValue.count == TunnelViewModel.keyLengthInBase64),
- let privateKey = Data(base64Encoded: stringValue),
- privateKey.count == TunnelConfiguration.keyLength {
+ if stringValue.count == TunnelViewModel.keyLengthInBase64, let privateKey = Data(base64Encoded: stringValue), privateKey.count == TunnelConfiguration.keyLength {
let publicKey = Curve25519.generatePublicKey(fromPrivateKey: privateKey)
scratchpad[.publicKey] = publicKey.base64EncodedString()
} else {