Skip to content

Commit 63e62b9

Browse files
authored
Merge pull request #2420 from drodriguez/remove-utf8-array
Remove unnecessary Array copy.
2 parents e1c3411 + b9b6a35 commit 63e62b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/JSONSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ open class JSONSerialization : NSObject {
130130
sortedKeys: opt.contains(.sortedKeys),
131131
writer: { (str: String?) in
132132
if let str = str {
133-
jsonStr.append(contentsOf: Array(str.utf8))
133+
jsonStr.append(contentsOf: str.utf8)
134134
}
135135
}
136136
)

0 commit comments

Comments
 (0)