Skip to content

Commit 0a096fe

Browse files
committed
Resolve warnings when not using the resulting catalog
1 parent da6db35 commit 0a096fe

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Modules/Sources/Yosemite/Tools/POS/POSCatalogIncrementalSyncService.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ public protocol POSCatalogIncrementalSyncServiceProtocol {
1414
/// - siteID: The site ID to sync catalog for.
1515
/// - lastFullSyncDate: The date of the last full sync to use if no incremental sync date exists.
1616
/// - Returns: The synced catalog containing updated products and variations
17-
func startIncrementalSync(for siteID: Int64, lastFullSyncDate: Date, lastIncrementalSyncDate: Date?) async throws -> POSCatalog
17+
@discardableResult
18+
func startIncrementalSync(for siteID: Int64,
19+
lastFullSyncDate: Date,
20+
lastIncrementalSyncDate: Date?) async throws -> POSCatalog
1821
}
1922

2023
// TODO - remove the periphery ignore comment when the service is integrated with POS.
@@ -53,7 +56,7 @@ public final class POSCatalogIncrementalSyncService: POSCatalogIncrementalSyncSe
5356
}
5457

5558
// MARK: - Protocol Conformance
56-
59+
@discardableResult
5760
public func startIncrementalSync(for siteID: Int64, lastFullSyncDate: Date, lastIncrementalSyncDate: Date?) async throws -> POSCatalog {
5861
let modifiedAfter = latestSyncDate(fullSyncDate: lastFullSyncDate, incrementalSyncDate: lastIncrementalSyncDate)
5962

Modules/Tests/YosemiteTests/Mocks/MockPOSCatalogIncrementalSyncService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class MockPOSCatalogIncrementalSyncService: POSCatalogIncrementalSyncServi
1313
private var shouldBlockSync = false
1414
private var syncBlockedContinuations: [CheckedContinuation<Void, Never>] = []
1515

16+
@discardableResult
1617
func startIncrementalSync(for siteID: Int64, lastFullSyncDate: Date, lastIncrementalSyncDate: Date?) async throws -> POSCatalog {
1718
startIncrementalSyncCallCount += 1
1819
lastSyncSiteID = siteID

0 commit comments

Comments
 (0)