Skip to content

Commit d328594

Browse files
authored
Revert "Revert "Require sendable userInfo values in JSON.withEncoding(of:userInfo:_:)""
1 parent 44684c1 commit d328594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Testing/Support/JSON.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum JSON {
2929
/// - Returns: Whatever is returned by `body`.
3030
///
3131
/// - Throws: Whatever is thrown by `body` or by the encoding process.
32-
static func withEncoding<R>(of value: some Encodable, userInfo: [CodingUserInfoKey: Any] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R {
32+
static func withEncoding<R>(of value: some Encodable, userInfo: [CodingUserInfoKey: any Sendable] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R {
3333
#if canImport(Foundation)
3434
let encoder = JSONEncoder()
3535

0 commit comments

Comments
 (0)