From ced84f78ccf93723328a3f0d37139b4d36b74d46 Mon Sep 17 00:00:00 2001 From: Jaanus Kase Date: Sat, 10 Aug 2024 22:51:32 +0300 Subject: [PATCH] Default values for some parameters --- Targets/CanopyTypes/Sources/Results/FetchRecordsResult.swift | 2 +- .../CanopyTypes/Sources/Results/ModifyRecordsResult.swift | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Targets/CanopyTypes/Sources/Results/FetchRecordsResult.swift b/Targets/CanopyTypes/Sources/Results/FetchRecordsResult.swift index f75c54f..16535b3 100644 --- a/Targets/CanopyTypes/Sources/Results/FetchRecordsResult.swift +++ b/Targets/CanopyTypes/Sources/Results/FetchRecordsResult.swift @@ -8,7 +8,7 @@ public struct FetchRecordsResult: Equatable, Sendable { /// Records that were not found based on the ID, but the operation was otherwise successful. public let notFoundRecordIDs: [CKRecord.ID] - public init(foundRecords: [CanopyResultRecord], notFoundRecordIDs: [CKRecord.ID]) { + public init(foundRecords: [CanopyResultRecord] = [], notFoundRecordIDs: [CKRecord.ID] = []) { self.foundRecords = foundRecords self.notFoundRecordIDs = notFoundRecordIDs } diff --git a/Targets/CanopyTypes/Sources/Results/ModifyRecordsResult.swift b/Targets/CanopyTypes/Sources/Results/ModifyRecordsResult.swift index 3778bba..4d0141c 100644 --- a/Targets/CanopyTypes/Sources/Results/ModifyRecordsResult.swift +++ b/Targets/CanopyTypes/Sources/Results/ModifyRecordsResult.swift @@ -9,7 +9,10 @@ public struct ModifyRecordsResult: Equatable, Sendable { /// Array of deleted record ID-s. This matches the array record ID-s that you gave to the function as input. public let deletedRecordIDs: [CKRecord.ID] - public init(savedRecords: [CanopyResultRecord], deletedRecordIDs: [CKRecord.ID]) { + public init( + savedRecords: [CanopyResultRecord] = [], + deletedRecordIDs: [CKRecord.ID] = [] + ) { self.savedRecords = savedRecords self.deletedRecordIDs = deletedRecordIDs }