Skip to content

Commit e600b1f

Browse files
authored
Fix a few recently introduced code warnings (#1074)
* Fix warnings about `var` that's not mutated in test * Fix warning about unused variable
1 parent e4e1d09 commit e600b1f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ struct SymbolGraphLoader {
297297
/// If the bundle defines default availability for the symbols in the given symbol graph
298298
/// this method adds them to each of the symbols in the graph.
299299
private func addDefaultAvailability(to symbolGraph: inout SymbolGraph, moduleName: String) {
300-
let selector = UnifiedSymbolGraph.Selector(forSymbolGraph: symbolGraph)
301300
// Check if there are defined default availabilities for the current module
302301
if let defaultAvailabilities = bundle.info.defaultAvailability?.modules[moduleName],
303302
let platformName = symbolGraph.module.platform.name.map(PlatformName.init) {

Tests/SwiftDocCTests/Infrastructure/SymbolGraph/SymbolGraphLoaderTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ class SymbolGraphLoaderTests: XCTestCase {
17381738
}
17391739
"""
17401740
)
1741-
var infoPlist = """
1741+
let infoPlist = """
17421742
<plist version="1.0">
17431743
<dict>
17441744
<key>CDAppleDefaultAvailability</key>
@@ -1769,7 +1769,7 @@ class SymbolGraphLoaderTests: XCTestCase {
17691769
let infoPlistURL = targetURL.appendingPathComponent("Info.plist")
17701770
try infoPlist.write(to: infoPlistURL, atomically: true, encoding: .utf8)
17711771
// Load the bundle & reference resolve symbol graph docs
1772-
var (_, _, context) = try loadBundle(from: targetURL)
1772+
let (_, _, context) = try loadBundle(from: targetURL)
17731773
guard let availability = (context.documentationCache["c:@F@Bar"]?.semantic as? Symbol)?.availability?.availability else {
17741774
XCTFail("Did not find availability for symbol 'c:@F@Bar'")
17751775
return

0 commit comments

Comments
 (0)