Skip to content

Commit

Permalink
Default values for some parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanus committed Aug 10, 2024
1 parent 771960f commit ced84f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ced84f7

Please # to comment.