@@ -1216,12 +1216,12 @@ private extension __JSONEncoder {
12161216 return . number( decimal. description)
12171217 } else if !options. keyEncodingStrategy. isDefault, let encodable = value as? _JSONStringDictionaryEncodableMarker {
12181218 return try self . wrap ( encodable as! [ String : Encodable ] , for: additionalKey)
1219- } else if let directArrayEncodable = _asDirectArrayEncoding ( value, for: additionalKey) {
1219+ } else if let array = _asDirectArrayEncodable ( value, for: additionalKey) {
12201220 if options. outputFormatting. contains ( . prettyPrinted) {
1221- let ( bytes, lengths) = try directArrayEncodable . individualElementRepresentation ( encoder: self , additionalKey)
1221+ let ( bytes, lengths) = try array . individualElementRepresentation ( encoder: self , additionalKey)
12221222 return . directArray( bytes, lengths: lengths)
12231223 } else {
1224- return . nonPrettyDirectArray( try directArrayEncodable . nonPrettyJSONRepresentation ( encoder: self , additionalKey) )
1224+ return . nonPrettyDirectArray( try array . nonPrettyJSONRepresentation ( encoder: self , additionalKey) )
12251225 }
12261226 }
12271227
@@ -1246,7 +1246,7 @@ private extension __JSONEncoder {
12461246 return encoder. takeValue ( )
12471247 }
12481248
1249- func _asDirectArrayEncoding < T: Encodable > ( _ value: T , for additionalKey: ( some CodingKey ) ? = _CodingKey? . none) -> _JSONDirectArrayEncodable ? {
1249+ func _asDirectArrayEncodable < T: Encodable > ( _ value: T , for additionalKey: ( some CodingKey ) ? = _CodingKey? . none) -> _JSONDirectArrayEncodable ? {
12501250 return if let array = _specializingCast ( array, to: [ Int8 ] . self) {
12511251 array
12521252 } else if let array = _specializingCast ( array, to: [ Int16 ] . self) {
0 commit comments