]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Fix confusing indentation
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 15 Dec 2018 03:42:11 +0000 (04:42 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 15 Dec 2018 03:42:46 +0000 (04:42 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuard/UI/TunnelViewModel.swift

index d542f986a6c4750a119f204dfb97081fe977dfed..7e19bb750f3a665649210e6276b0d60fe939fffc 100644 (file)
@@ -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 {