Skip to content

Commit 0e7ce39

Browse files
authored
Merge pull request #959 from swiftlang/revert-957-revert-955-JSONEncoder-sendable-userInfo
Require sendable userInfo values in JSON.withEncoding(of:userInfo:_:)
2 parents 44684c1 + d328594 commit 0e7ce39

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)