Skip to content

Commit

Permalink
Use flatMapSet helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Oct 31, 2023
1 parent 94265ec commit e5ebd3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/PeripheryKit/Indexer/Declaration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ final class Declaration {
}

var descendentDeclarations: Set<Declaration> {
Set(declarations.flatMap { $0.descendentDeclarations }).union(declarations).union(unusedParameters)
declarations
.flatMapSet { $0.descendentDeclarations }
.union(declarations)
.union(unusedParameters)
}

var immediateInheritedTypeReferences: Set<Reference> {
Expand Down

0 comments on commit e5ebd3d

Please sign in to comment.