Skip to content

Commit 276238a

Browse files
committed
Avoid force-unwrapping converted tokens
1 parent 9c76968 commit 276238a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Clang/TranslationUnit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public class TranslationUnit {
203203
clang_annotateTokens(clang, buf.baseAddress,
204204
UInt32(buf.count), cursors)
205205
}
206-
return (0..<toks.count).map { convertCursor(cursors[$0])! }
206+
return (0..<toks.count).flatMap { convertCursor(cursors[$0]) }
207207
}
208208

209209
deinit {

0 commit comments

Comments
 (0)