diff --git a/Sources/swift-parsing-benchmark/JSON.swift b/Sources/swift-parsing-benchmark/JSON.swift index 18d4921d67..022e2e5b1d 100644 --- a/Sources/swift-parsing-benchmark/JSON.swift +++ b/Sources/swift-parsing-benchmark/JSON.swift @@ -70,7 +70,10 @@ let jsonSuite = BenchmarkSuite(name: "JSON") { suite in struct JSONObject: ParserPrinter { var body: some ParserPrinter { "{".utf8 - Many(into: [String: JSONValue.Output]()) { object, pair in + Many(into: [String: JSONValue.Output]()) { ( + object: inout [String: JSONValue.Output], + pair: (String, JSONValue.Output) + ) in let (name, value) = pair object[name] = value } decumulator: { object in diff --git a/Tests/ParsingTests/OneOfTests.swift b/Tests/ParsingTests/OneOfTests.swift index b0d829a53b..86a0bb4e5f 100644 --- a/Tests/ParsingTests/OneOfTests.swift +++ b/Tests/ParsingTests/OneOfTests.swift @@ -271,7 +271,10 @@ final class OneOfTests: XCTestCase { struct JSONObject: ParserPrinter { var body: some ParserPrinter { "{".utf8 - Many(into: [String: JSONValue.Output]()) { object, pair in + Many(into: [String: JSONValue.Output]()) { ( + object: inout [String: JSONValue.Output], + pair: (String, JSONValue.Output) + ) in let (name, value) = pair object[name] = value } decumulator: { object in