Skip to content

Commit f433f58

Browse files
committed
Miscellaneous small cleanups
1 parent 82c5fa9 commit f433f58

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Sources/DocCDocumentation/BuildSystemIntegrationExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ package extension BuildSystemManager {
5252
func doccCatalog(for target: BuildTargetIdentifier) async -> URL? {
5353
let sourceFiles =
5454
await orLog(
55-
"Failed to retreive source files from target \(target.uri)",
55+
"Failed to retrieve source files from target \(target.uri)",
5656
{ try await self.sourceFiles(in: [target]).flatMap(\.sources) }
5757
) ?? []
5858
let catalogURLs = sourceFiles.compactMap { sourceItem -> URL? in

Sources/DocCDocumentation/DocCCatalogIndexManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ final actor DocCCatalogIndexManager {
5959
indexCache[catalogURL] = .success(catalogIndex)
6060
return catalogIndex
6161
} catch {
62-
// Don't cache cancellation errors
63-
guard !(error is CancellationError) else {
62+
if error is CancellationError {
63+
// Don't cache cancellation errors
6464
throw .cancelled
6565
}
6666
let internalError = error as? DocCIndexError ?? DocCIndexError.internalError(error)

Sources/SourceKitLSP/Documentation/DocumentationLanguageService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package import SwiftSyntax
1818
package import ToolchainRegistry
1919

2020
package actor DocumentationLanguageService: LanguageService, Sendable {
21-
/// The ``SourceKitLSPServer`` instance that created this `SwiftLanguageService`.
21+
/// The ``SourceKitLSPServer`` instance that created this `DocumentationLanguageService`.
2222
private(set) weak var sourceKitLSPServer: SourceKitLSPServer?
2323

2424
var documentManager: DocumentManager {

Sources/SourceKitLSP/Swift/DiagnosticReportManager.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ actor DiagnosticReportManager {
182182
for snapshotID: DocumentSnapshot.ID,
183183
buildSettings: SwiftCompileCommand?
184184
) -> ReportTask? {
185-
let key = CacheKey(snapshotID: snapshotID, buildSettings: buildSettings)
186-
return reportTaskCache[key]
185+
return reportTaskCache[CacheKey(snapshotID: snapshotID, buildSettings: buildSettings)]
187186
}
188187

189188
/// Set the reportTask for the given document snapshot and buildSettings.

0 commit comments

Comments
 (0)