diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-15 04:42:11 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-15 04:42:46 +0100 |
commit | 1e9c806614d944b689ed910d0f15679913869535 (patch) | |
tree | 77a6c4edfe34fc2ff6cb8dbf8c1edc53f31a9903 /WireGuard/WireGuard/UI | |
parent | KeyValueCells now share code (diff) | |
download | wireguard-apple-1e9c806614d944b689ed910d0f15679913869535.tar.xz wireguard-apple-1e9c806614d944b689ed910d0f15679913869535.zip |
Fix confusing indentation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/TunnelViewModel.swift | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift index d542f98..7e19bb7 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 { |