Skip to content

Commit 537e063

Browse files
author
David Ungar
committed
Use a lazy collection to avoid materializing the result collection of sortByCommandLineOrder
1 parent d880e2e commit 537e063

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ extension IncrementalCompilationState.FirstWaveComputer {
192192
return skippedInputs
193193
}
194194

195-
private func sortByCommandLineOrder(_ inputs: Set<TypedVirtualPath>) -> [TypedVirtualPath] {
196-
inputFiles.filter (inputs.contains)
195+
private func sortByCommandLineOrder(
196+
_ inputs: Set<TypedVirtualPath>
197+
) -> LazyFilterSequence<[TypedVirtualPath]> {
198+
inputFiles.lazy.filter(inputs.contains)
197199
}
198200

199201
/// Encapsulates information about an input the driver has determined has

0 commit comments

Comments
 (0)