Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
juicyfru1t committed Sep 30, 2024
1 parent 6726c90 commit 2ca51e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public enum DictionaryDataDecodingStrategy {
case base64

/// The strategy that decodes data using a user-defined function.
case custom((_ decoder: Decoder) throws -> Data)
case custom(@Sendable (_ decoder: Decoder) throws -> Data)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ public enum DictionaryDateDecodingStrategy {
case formatted(DateFormatter)

/// The strategy that formats custom dates by calling a user-defined function.
case custom((_ decoder: Decoder) throws -> Date)
case custom(@Sendable (_ decoder: Decoder) throws -> Date)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ public enum DictionaryKeyDecodingStrategy {
case useDefaultKeys

/// A key decoding strategy defined by the closure you supply.
case custom((_ codingPath: [CodingKey]) -> CodingKey)
case custom(@Sendable (_ codingPath: [CodingKey]) -> CodingKey)
}
10 changes: 5 additions & 5 deletions Tests/Tools/DictionaryDecoder/DictionaryDecoderTesting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension DictionaryDecoderTesting {
func assertDecoderSucceeds<Key: Decodable & Hashable, Value: Decodable & FloatingPoint & Equatable>(
decoding expectedValue: [Key: Value],
from dictionary: [String: Any],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -48,7 +48,7 @@ extension DictionaryDecoderTesting {
func assertDecoderSucceeds<Key: Decodable & Hashable, Value: Decodable & FloatingPoint & Equatable>(
decoding valueType: [Key: Value].Type,
from dictionary: [String: Any],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -68,7 +68,7 @@ extension DictionaryDecoderTesting {
func assertDecoderSucceeds<T: Decodable & Equatable>(
decoding expectedValue: T,
from dictionary: [String: Any],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -83,7 +83,7 @@ extension DictionaryDecoderTesting {
func assertDecoderSucceeds<T: Decodable & Equatable>(
decoding valueType: T.Type,
from dictionary: [String: Any],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -103,7 +103,7 @@ extension DictionaryDecoderTesting {
func assertDecoderFails<T: Decodable>(
decoding valueType: T.Type,
from dictionary: [String: Any],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line,
errorValidation: (_ error: Error) -> Bool
) {
Expand Down
6 changes: 3 additions & 3 deletions Tests/Tools/URLQueryDecoder/URLQueryDecoderTesting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension URLQueryDecoderTesting {
decoding valueType: [Key: Value].Type,
from query: String,
expecting expectedValue: [Key: Value],
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -34,7 +34,7 @@ extension URLQueryDecoderTesting {
decoding valueType: T.Type,
from query: String,
expecting expectedValue: T,
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line
) {
do {
Expand All @@ -49,7 +49,7 @@ extension URLQueryDecoderTesting {
func assertDecoderFails<T: Decodable>(
decoding valueType: T.Type,
from query: String,
file: StaticString = #file,
file: StaticString = #filePath,
line: UInt = #line,
errorValidation: (_ error: Error) -> Bool
) {
Expand Down

0 comments on commit 2ca51e4

Please sign in to comment.