Skip to content

Commit fae6d5e

Browse files
committed
[PackageLoading] Use flatMap vs map + flatten.
1 parent cb0b458 commit fae6d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageLoading/Module+PkgConfig.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension ModuleProtocol {
1919
// swift compiler.
2020
public func pkgConfigSwiftcArgs() throws -> [String] {
2121
let pkgArgs = try pkgConfigArgs()
22-
return pkgArgs.cFlags.map{["-Xcc", $0]}.flatten() + pkgArgs.libs
22+
return pkgArgs.cFlags.flatMap{ ["-Xcc", $0] } + pkgArgs.libs
2323
}
2424

2525
/// Finds cFlags and link flags for all the CModule i.e. System Module

0 commit comments

Comments
 (0)