Skip to content

Commit

Permalink
Merge pull request #959 from swiftlang/revert-957-revert-955-JSONEnco…
Browse files Browse the repository at this point in the history
…der-sendable-userInfo

Require sendable userInfo values in JSON.withEncoding(of:userInfo:_:)
  • Loading branch information
bnbarham authored Feb 13, 2025
2 parents 44684c1 + d328594 commit 0e7ce39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Testing/Support/JSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum JSON {
/// - Returns: Whatever is returned by `body`.
///
/// - Throws: Whatever is thrown by `body` or by the encoding process.
static func withEncoding<R>(of value: some Encodable, userInfo: [CodingUserInfoKey: Any] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R {
static func withEncoding<R>(of value: some Encodable, userInfo: [CodingUserInfoKey: any Sendable] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R {
#if canImport(Foundation)
let encoder = JSONEncoder()

Expand Down

0 comments on commit 0e7ce39

Please sign in to comment.