Skip to content

Commit 29ff751

Browse files
committed
Apply PR suggestions for inlay hints
1 parent 3fef514 commit 29ff751

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Sources/SourceKitLSP/Swift/ExpressionTypeInfo.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ extension SwiftLanguageServer {
5454
_ uri: DocumentURI,
5555
_ completion: @escaping (Swift.Result<[ExpressionTypeInfo], ExpressionTypeInfoError>) -> Void
5656
) {
57-
if #available(macOS 10.12, *) {
58-
dispatchPrecondition(condition: .onQueue(queue))
59-
}
57+
dispatchPrecondition(condition: .onQueue(queue))
6058

6159
guard let snapshot = documentManager.latestSnapshot(uri) else {
6260
return completion(.failure(.unknownDocument(uri)))
@@ -87,7 +85,7 @@ extension SwiftLanguageServer {
8785

8886
skExpressionTypeInfos.forEach { (_, skExpressionTypeInfo) -> Bool in
8987
guard let info = ExpressionTypeInfo(skExpressionTypeInfo, in: snapshot) else {
90-
assert(false, "ExpressionTypeInfo failed to deserialize")
88+
assertionFailure("ExpressionTypeInfo failed to deserialize")
9189
return true
9290
}
9391
expressionTypeInfos.append(info)

Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,7 @@ extension SwiftLanguageServer {
512512
_ uri: DocumentURI,
513513
_ completion: @escaping (Result<[DocumentSymbol], ResponseError>) -> Void
514514
) {
515-
if #available(macOS 10.12, *) {
516-
dispatchPrecondition(condition: .onQueue(queue))
517-
}
515+
dispatchPrecondition(condition: .onQueue(queue))
518516

519517
guard let snapshot = self.documentManager.latestSnapshot(uri) else {
520518
let msg = "failed to find snapshot for url \(uri)"

0 commit comments

Comments
 (0)