Enable SwiftLint rule 'unneeded_parentheses_in_closure_argument' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 23:32:43 +02:00 committed by Mingshen Sun
parent 5cca2c30d8
commit ab80e5297e
8 changed files with 13 additions and 13 deletions

View file

@ -247,7 +247,7 @@ class PasswordEditorTableViewController: UITableViewController {
if selectedCell == deletePasswordCell {
let alert = UIAlertController(title: "DeletePassword?".localize(), message: nil, preferredStyle: UIAlertController.Style.alert)
alert.addAction(
UIAlertAction(title: "Delete".localize(), style: UIAlertAction.Style.destructive) { [unowned self] (_) -> Void in
UIAlertAction(title: "Delete".localize(), style: UIAlertAction.Style.destructive) { [unowned self] _ -> Void in
self.performSegue(withIdentifier: "deletePasswordSegue", sender: self)
}
)
@ -441,7 +441,7 @@ extension PasswordEditorTableViewController: SFSafariViewControllerDelegate {
message.append(Utils.attributedPassword(plainPassword: generatedPassword))
alert.setValue(message, forKey: "attributedMessage")
alert.addAction(
UIAlertAction(title: "Yes", style: UIAlertAction.Style.default) { [unowned self] (_) -> Void in
UIAlertAction(title: "Yes", style: UIAlertAction.Style.default) { [unowned self] _ -> Void in
// update tableData so to make sure reloadData() works correctly
self.tableData[self.passwordSection][0][PasswordEditorCellKey.content] = generatedPassword
// update cell manually, no need to call reloadData()