Skip to content

Commit 81fe786

Browse files
authored
Merge pull request #1917 from ahoppen/linkfilelist-set
Change `linkFileList` to be a `Set`
2 parents 8ac1bee + 13068d5 commit 81fe786

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Sources/SKTestSupport/SwiftPMTestProject.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,18 @@ package class SwiftPMTestProject: MultiFileTestProject {
102102
throw LinkFileListNotFoundError(url: linkFileListURL)
103103
}
104104
let linkFileList =
105-
linkFileListContents
106-
.split(separator: "\n")
107-
.map {
108-
// Files are wrapped in single quotes if the path contains spaces. Drop the quotes.
109-
if $0.hasPrefix("'") && $0.hasSuffix("'") {
110-
return String($0.dropFirst().dropLast())
111-
} else {
112-
return String($0)
113-
}
114-
}
105+
Set(
106+
linkFileListContents
107+
.split(separator: "\n")
108+
.map {
109+
// Files are wrapped in single quotes if the path contains spaces. Drop the quotes.
110+
if $0.hasPrefix("'") && $0.hasSuffix("'") {
111+
return String($0.dropFirst().dropLast())
112+
} else {
113+
return String($0)
114+
}
115+
}
116+
)
115117

116118
let swiftSyntaxModulesToLink = [
117119
"SwiftBasicFormat",

0 commit comments

Comments
 (0)