Skip to content

Commit

Permalink
Set swift version for formatter (#9)
Browse files Browse the repository at this point in the history
This allows the formatter to perform rewrites that only work in newer versions of Swift.
  • Loading branch information
bisgardo authored Jan 17, 2024
1 parent 89c8967 commit 7cbce0e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.6
2 changes: 1 addition & 1 deletion Sources/ConcordiumSwiftSDK/Extensions/Data+Helper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public extension Data {
}

func hexadecimalString() -> String {
return map { String(format: "%02hhx", $0) }.joined()
map { String(format: "%02hhx", $0) }.joined()
}
}
12 changes: 3 additions & 9 deletions Sources/ConcordiumSwiftSDK/Model/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ public struct Release {
.init(
timestamp: dateFromUnixTimeMillis(grpc.timestamp.value),
amount: grpc.amount.value,
transactions: grpc.transactions.map {
$0.value
}
transactions: grpc.transactions.map(\.value)
)
}
}
Expand Down Expand Up @@ -332,9 +330,7 @@ public enum AccountCredentialWithoutProofs<C, A> {
attributes: v.commitments.attributes.mapValues {
$0.value
},
idCredSecSharingCoeff: v.commitments.idCredSecSharingCoeff.map {
$0.value
}
idCredSecSharingCoeff: v.commitments.idCredSecSharingCoeff.map(\.value)
)
)
}
Expand Down Expand Up @@ -375,9 +371,7 @@ public struct AccountEncryptedAmount {
selfAmount: grpc.selfAmount.value,
startIndex: grpc.startIndex,
aggregatedAmount: grpc.aggregatedAmount.value,
incomingAmounts: grpc.incomingAmounts.map {
$0.value
}
incomingAmounts: grpc.incomingAmounts.map(\.value)
)
}
}
Expand Down

0 comments on commit 7cbce0e

Please sign in to comment.