Skip to content

Commit 60f2d6a

Browse files
committed
[OutputByteStream] Remove unnecessary workaround.
1 parent fd3725f commit 60f2d6a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/Basic/OutputByteStream.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,12 @@ public class OutputByteStream: OutputStream {
130130
/// does not write any other characters (like the quotes that would surround
131131
/// a JSON string).
132132
public func writeJSONEscaped(_ string: String) {
133-
// See RFC7159 for reference.
133+
// See RFC7159 for reference: https://tools.ietf.org/html/rfc7159
134134
for character in string.utf8 {
135+
// Handle string escapes; we use constants here to directly match the RFC.
135136
switch character {
136137
// Literal characters.
137-
//
138-
// FIXME: Workaround: <rdar://problem/22546289> Unexpected crash with range to max value for type
139-
case 0x20...0x21, 0x23...0x5B, 0x5D...0xFE, 0xFF:
138+
case 0x20...0x21, 0x23...0x5B, 0x5D...0xFF:
140139
write(character)
141140

142141
// Single-character escaped characters.

0 commit comments

Comments
 (0)