Assign nil by unwrapping optional

This commit is contained in:
Danny Moesch 2019-05-01 17:09:34 +02:00
parent 9e0d60989b
commit 89c0d3c98e

View file

@ -30,11 +30,7 @@ public class PasswordStore {
public var pgpKeyID: String? public var pgpKeyID: String?
public var publicKey: Key? { public var publicKey: Key? {
didSet { didSet {
if publicKey != nil { pgpKeyID = publicKey?.keyID.shortIdentifier
pgpKeyID = publicKey!.keyID.shortIdentifier
} else {
pgpKeyID = nil
}
} }
} }
public var privateKey: Key? public var privateKey: Key?