Set name and url in Password non-optional

Name and url in Password class shouldn't be optional because we store
them in core data as non-optional. This change also help us to avoid
man unneccessary unwrap.
This commit is contained in:
Bob Sun 2018-11-10 22:38:12 -08:00
parent 5262ca89f7
commit 2abbceb2e9
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
9 changed files with 60 additions and 39 deletions

View file

@ -45,7 +45,7 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
plainText.append(additionsString)
}
let (name, url) = getNameURL()
if password!.plainText != plainText || password!.url!.path != url.path {
if password!.plainText != plainText || password!.url.path != url.path {
password!.updatePassword(name: name, url: url, plainText: plainText)
}
}