Skip to content

Commit 806e8ef

Browse files
committed
Update for latest indexstore-db API
1 parent 223d11d commit 806e8ef

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/SourceKit/SourceKitServer.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,6 @@ extension IndexSymbolKind {
604604
extension SymbolOccurrence {
605605
/// Get the name of the symbol that is a parent of this symbol, if one exists
606606
func getContainerName() -> String? {
607-
var foundChildRelation: SymbolRelation?
608-
self.forEachRelation { relation in
609-
if relation.roles.contains(.childOf) {
610-
foundChildRelation = relation
611-
return false
612-
}
613-
return true
614-
}
615-
return foundChildRelation?.symbol.name
607+
return relations.first(where: { $0.roles.contains(.childOf) })?.symbol.name
616608
}
617609
}

0 commit comments

Comments
 (0)