diff --git a/Model/Migration/MigrationService.swift b/Model/Migration/MigrationService.swift index 6b50f02f..6b16cd7e 100644 --- a/Model/Migration/MigrationService.swift +++ b/Model/Migration/MigrationService.swift @@ -41,10 +41,8 @@ struct MigrationService { func migrateAll(using userDefaults: UserDefaulting = UserDefaults.standard) -> Bool { var allSucceeded = true - for migration in migrations { - if migration.migrate(userDefaults) == false { - allSucceeded = false - } + for migration in migrations where migration.migrate(userDefaults) == false { + allSucceeded = false } return allSucceeded } diff --git a/Tests/MigrationServiceTests.swift b/Tests/MigrationServiceTests.swift index dc13e75d..814c6b17 100644 --- a/Tests/MigrationServiceTests.swift +++ b/Tests/MigrationServiceTests.swift @@ -87,7 +87,7 @@ final class MigrationServiceTests: XCTestCase { private final class MockUserDefaults: UserDefaulting { private var values: [String: Bool] - init(values: [String : Bool] = [:]) { + init(values: [String: Bool] = [:]) { self.values = values }