From 7e9de23986e1c30f77fd6085dd330b242d2d3b21 Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 26 May 2025 12:32:01 +0200 Subject: [PATCH] minor changes --- LeStorage/StoreCenter.swift | 2 +- LeStorage/SyncedCollection.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LeStorage/StoreCenter.swift b/LeStorage/StoreCenter.swift index cab4378..2c3c9cc 100644 --- a/LeStorage/StoreCenter.swift +++ b/LeStorage/StoreCenter.swift @@ -627,7 +627,7 @@ public class StoreCenter { } - func testSynchronizeOnceAsync() async throws -> Data { + @discardableResult func testSynchronizeOnceAsync() async throws -> Data { guard self.isAuthenticated else { throw StoreError.missingToken } diff --git a/LeStorage/SyncedCollection.swift b/LeStorage/SyncedCollection.swift index 6c5a756..961a876 100644 --- a/LeStorage/SyncedCollection.swift +++ b/LeStorage/SyncedCollection.swift @@ -278,7 +278,7 @@ public class SyncedCollection: SomeSyncedCollection, Collect // MARK: - Asynchronous operations /// Adds or update an instance asynchronously and waits for network operations - func addOrUpdateAsync(instance: T) async throws { + public func addOrUpdateAsync(instance: T) async throws { let result = _addOrUpdateCore(instance: instance) if result.method == .insert { try await self._executeBatchOnce(OperationBatch(insert: instance)) @@ -287,7 +287,7 @@ public class SyncedCollection: SomeSyncedCollection, Collect } } - func addOrUpdateAsync(contentOfs sequence: any Sequence) async throws { + public func addOrUpdateAsync(contentOfs sequence: any Sequence) async throws { let batch = self._addOrUpdateCore(contentOfs: sequence) try await self._executeBatchOnce(batch) } @@ -300,7 +300,7 @@ public class SyncedCollection: SomeSyncedCollection, Collect } /// Deletes an instance and writes - func deleteAsync(instance: T) async throws { + public func deleteAsync(instance: T) async throws { self.collection.delete(instance: instance, actionOption: .syncedCascade) self.storeCenter.createDeleteLog(instance) try await self._executeBatchOnce(OperationBatch(delete: instance))