Skip to content

Commit 7219024

Browse files
aomathwiftfreak4pc
authored andcommitted
Fix: Pass as a parenthesized argument to remove confusion with trailing closure
1 parent f75cbd4 commit 7219024

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/package-spm.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func packageRelativePath(_ paths: [String], targetDirName: String, excluded: [St
9393

9494
print("Checking " + targetPath)
9595

96-
for file in try fileManager.contentsOfDirectory(atPath: targetPath).sorted { $0 < $1 } {
96+
for file in try fileManager.contentsOfDirectory(atPath: targetPath).sorted(by: { $0 < $1 }) {
9797
if file != "include" && file != ".DS_Store" {
9898
print("Checking extension \(file)")
9999
try checkExtension(file)
@@ -150,7 +150,7 @@ func buildAllTestsTarget(_ testsPath: String) throws {
150150

151151
var reducedMethods: [String: [String]] = [:]
152152

153-
for file in try fileManager.contentsOfDirectory(atPath: testsPath).sorted { $0 < $1 } {
153+
for file in try fileManager.contentsOfDirectory(atPath: testsPath).sorted(by: { $0 < $1 }) {
154154
if !file.hasSuffix(".swift") || file == "main.swift" {
155155
continue
156156
}

0 commit comments

Comments
 (0)