From d328594973784ceaa81c1db1371e56accc19b20d Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Thu, 13 Feb 2025 08:41:24 -0800 Subject: [PATCH] Revert "Revert "Require sendable userInfo values in JSON.withEncoding(of:userInfo:_:)"" --- Sources/Testing/Support/JSON.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Testing/Support/JSON.swift b/Sources/Testing/Support/JSON.swift index f23e51384..76c7b7f07 100644 --- a/Sources/Testing/Support/JSON.swift +++ b/Sources/Testing/Support/JSON.swift @@ -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(of value: some Encodable, userInfo: [CodingUserInfoKey: Any] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R { + static func withEncoding(of value: some Encodable, userInfo: [CodingUserInfoKey: any Sendable] = [:], _ body: (UnsafeRawBufferPointer) throws -> R) throws -> R { #if canImport(Foundation) let encoder = JSONEncoder()