Skip to content

Commit e423315

Browse files
committed
[PkgConfig] Fix reviewed code
1 parent 67e2c35 commit e423315

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/TSCUtility/PkgConfig.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ public struct PkgConfig {
174174
var libs = [String]()
175175

176176
for dep in dependencies {
177-
let firstOccurrence = loadingContext.pkgConfigStack.firstIndex(of: dep)
178-
179-
if let index = firstOccurrence {
177+
if let index = loadingContext.pkgConfigStack.firstIndex(of: dep) {
180178
diagnostics.emit(warning: "circular dependency detected while parsing \(loadingContext.pkgConfigStack[0]): \(loadingContext.pkgConfigStack[index..<loadingContext.pkgConfigStack.count].joined(separator: " -> ")) -> \(dep)")
181179
continue
182180
}

0 commit comments

Comments
 (0)