diff --git a/Storage/Storage/CoreData/CoreDataManager.swift b/Storage/Storage/CoreData/CoreDataManager.swift index f1c22c3bd41..917d9de6570 100644 --- a/Storage/Storage/CoreData/CoreDataManager.swift +++ b/Storage/Storage/CoreData/CoreDataManager.swift @@ -144,10 +144,10 @@ public final class CoreDataManager: StorageManagerType { /// Handles a write operation using the background context and saves changes when done. /// - public func performAndSave(_ block: @escaping (StorageType) -> Void, completion: (() -> Void)?) { + public func performAndSave(_ closure: @escaping (StorageType) -> Void, completion: (() -> Void)?) { let derivedStorage = writerDerivedStorage derivedStorage.perform { - block(derivedStorage) + closure(derivedStorage) derivedStorage.saveIfNeeded() completion?() } diff --git a/Storage/Storage/Protocols/StorageManagerType.swift b/Storage/Storage/Protocols/StorageManagerType.swift index 760380548f5..3a3496c6240 100644 --- a/Storage/Storage/Protocols/StorageManagerType.swift +++ b/Storage/Storage/Protocols/StorageManagerType.swift @@ -36,10 +36,10 @@ public protocol StorageManagerType { /// Helper method to perform a write operation and save the changes in a background context. /// - Parameters: - /// - block: the write operation to be handled, given the derived StorageType. + /// - closure: the write operation to be handled, given the derived StorageType. /// - completion: Callback to be executed on completion /// - func performAndSave(_ block: @escaping (StorageType) -> Void, completion: (() -> Void)?) + func performAndSave(_ closure: @escaping (StorageType) -> Void, completion: (() -> Void)?) /// This method is expected to destroy all persisted data. A notification of type `StorageManagerDidResetStorage` should get /// posted. diff --git a/Yosemite/YosemiteTests/Mocks/MockStorageManager.swift b/Yosemite/YosemiteTests/Mocks/MockStorageManager.swift index c3136e67565..92d9dba7988 100644 --- a/Yosemite/YosemiteTests/Mocks/MockStorageManager.swift +++ b/Yosemite/YosemiteTests/Mocks/MockStorageManager.swift @@ -86,10 +86,10 @@ public class MockStorageManager: StorageManagerType { /// Handles a write operation using the background context and saves changes when done. /// - public func performAndSave(_ block: @escaping (StorageType) -> Void, completion: (() -> Void)?) { + public func performAndSave(_ closure: @escaping (StorageType) -> Void, completion: (() -> Void)?) { let derivedStorage = writerDerivedStorage derivedStorage.perform { - block(derivedStorage) + closure(derivedStorage) derivedStorage.saveIfNeeded() completion?() }