Skip to content

Commit ee51cda

Browse files
committed
[Utils] Remove the null buffer check, the crash was fixed
Fix: swiftlang#22417
1 parent c1a4491 commit ee51cda

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Sources/SwiftSyntax/Utils.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public struct SourceEdit {
7171

7272
extension String {
7373
static func fromBuffer(_ textBuffer: UnsafeBufferPointer<UInt8>) -> String {
74-
// The string function crashes if the buffer is empty with nil pointer (SR-9869).
75-
guard !textBuffer.isEmpty else { return String() }
7674
return String(decoding: textBuffer, as: UTF8.self)
7775
}
7876

0 commit comments

Comments
 (0)