Enable SwiftLint rule 'trailing_closure' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 23:15:29 +02:00 committed by Mingshen Sun
parent 937019d6e8
commit 0317f5a83b
5 changed files with 6 additions and 6 deletions

View file

@ -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)