Skip to content

Commit bb5b4c9

Browse files
macshomeahoppen
andauthored
Update Sources/SwiftFormat/PrettyPrint/PrettyPrintBuffer.swift
Co-authored-by: Alex Hoppen <[email protected]>
1 parent 87467ee commit bb5b4c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftFormat/PrettyPrint/PrettyPrintBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct PrettyPrintBuffer {
125125
var lastLength = 0
126126
// We are only interested in "\n" we can use the UTF8 view and skip the grapheme clustering.
127127
for element in text.utf8 {
128-
if element == 10 {
128+
if element == UInt8(ascii: "\n") {
129129
lineNumber += 1
130130
lastLength = 0
131131
} else {

0 commit comments

Comments
 (0)