Skip to content

Commit a817ec4

Browse files
committed
Merge pull request #145 from kostiakoval/refactor-isLibrary
Refactor isLibrary method
2 parents 76416da + 4bc9902 commit a817ec4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/PackageType/Module.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@ public class SwiftModule: Module {
5050
}
5151

5252
public var isLibrary: Bool {
53-
for path in sources.relativePaths {
54-
if path.basename.lowercaseString == "main.swift" {
55-
return false
56-
}
53+
return !sources.relativePaths.contains { path in
54+
path.basename.lowercaseString == "main.swift"
5755
}
58-
return true
5956
}
6057
}
6158

0 commit comments

Comments
 (0)