We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24af779 commit 0c34639Copy full SHA for 0c34639
Sources/SwiftProtobuf/JSONEncodingVisitor.swift
@@ -284,10 +284,6 @@ internal struct JSONEncodingVisitor: Visitor {
284
let alwaysPrintEnumsAsInts = options.alwaysPrintEnumsAsInts
285
try _visitRepeated(value: value, fieldNumber: fieldNumber) {
286
(encoder: inout JSONEncoder, v: E) throws in
287
- // TODO: This cast is expensive to repeat for every item
288
- // in the array. To eliminate it, make `encodedJSONString`
289
- // static, and cast E.self to _CustomJSONCodable.Type outside
290
- // of this loop so we can use that static method.
291
if let e = v as? _CustomJSONCodable {
292
let json = try e.encodedJSONString(options: options)
293
encoder.append(text: json)
0 commit comments