Enable SwiftLint rule 'trailing_closure' and fix all violations
This commit is contained in:
parent
937019d6e8
commit
0317f5a83b
5 changed files with 6 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ public enum AppError: Error, Equatable {
|
|||
|
||||
extension AppError: LocalizedError {
|
||||
public var errorDescription: String? {
|
||||
let localizationKey = "\(String(describing: self).prefix(while: { $0 != "(" }))Error."
|
||||
let localizationKey = "\(String(describing: self).prefix { $0 != "(" })Error."
|
||||
switch self {
|
||||
case let .RepositoryRemoteBranchNotFound(name), let .RepositoryBranchNotFound(name), let .ReadingFile(name):
|
||||
return localizationKey.localize(name)
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class Password {
|
|||
|
||||
private func getAdditionValue(withKey key: String, caseSensitive: Bool = false) -> String? {
|
||||
let toLowercase = { (string: String) -> String in caseSensitive ? string : string.lowercased() }
|
||||
return additions.first(where: { toLowercase($0.title) == toLowercase(key) })?.content
|
||||
return additions.first { toLowercase($0.title) == toLowercase(key) }?.content
|
||||
}
|
||||
|
||||
/// Set the OTP token if we are able to construct a valid one.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue