Skip to content

Commit 9b69452

Browse files
committed
Flatten whitespaceScalars
1 parent 000cd70 commit 9b69452

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Foundation/NSJSONSerialization.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,7 @@ private struct JSONDeserializer {
196196
}
197197
}
198198

199-
static let whitespaceScalars = [
200-
UnicodeScalar(0x20), // Space
201-
UnicodeScalar(0x09), // Horizontal tab
202-
UnicodeScalar(0x0A), // Line feed or New line
203-
UnicodeScalar(0x0D) // Carriage return
204-
]
205-
199+
static let whitespaceScalars = "\u{20}\u{09}\u{0A}\u{0D}".unicodeScalars
206200
static func consumeWhitespace(parser: UnicodeParser) -> UnicodeParser {
207201
var index = parser.index
208202
let view = parser.view

0 commit comments

Comments
 (0)