Enable SwiftLint rule 'static_operator' and fix all violations
This commit is contained in:
parent
831ffe2235
commit
b7e08dfb9e
3 changed files with 15 additions and 9 deletions
|
|
@ -50,11 +50,14 @@ func assertDefaults(
|
|||
}
|
||||
|
||||
infix operator ∈: AdditionPrecedence
|
||||
func ∈ (field: AdditionField, password: Password) -> Bool { // swiftlint:disable:this identifier_name
|
||||
password.getFilteredAdditions().contains(field)
|
||||
}
|
||||
|
||||
infix operator ∉: AdditionPrecedence
|
||||
func ∉ (field: AdditionField, password: Password) -> Bool { // swiftlint:disable:this identifier_name
|
||||
!(field ∈ password)
|
||||
|
||||
extension AdditionField {
|
||||
static func ∈ (field: AdditionField, password: Password) -> Bool { // swiftlint:disable:this identifier_name
|
||||
password.getFilteredAdditions().contains(field)
|
||||
}
|
||||
|
||||
static func ∉ (field: AdditionField, password: Password) -> Bool { // swiftlint:disable:this identifier_name
|
||||
!(field ∈ password)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue