Enable SwiftLint rule 'contains_over_first_not_nil' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-04 22:01:01 +02:00 committed by Mingshen Sun
parent 08473f8f05
commit 7d79314bae
2 changed files with 2 additions and 2 deletions

View file

@ -265,7 +265,7 @@ class PasswordEditorTableViewController: UITableViewController {
// Remove delimiter configuration for XKCD style passwords. Re-add it for random ones.
switch flavor {
case .random:
guard tableData[1].first(where: isPasswordDelimiterCellData) == nil else {
if tableData[1].contains(where: isPasswordDelimiterCellData) {
return
}
tableData[1].insert([.type: PasswordEditorCellType.passwordGroupsCell], at: tableData[1].endIndex)