Skip to content

Commit fa96bdf

Browse files
committed
PackageLoading: use compactMap instead of flatMap (NFC)
This just replaces `flatpMap` which is deprecated in favour of `compactMap` to avoid a deprecation warning. NFCI.
1 parent 1bcf98d commit fa96bdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageLoading/PackageBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ public final class PackageBuilder {
845845
conditions.append(condition)
846846
}
847847

848-
if let platforms = condition?.platformNames.flatMap({ platformRegistry.platformByName[$0] }), !platforms.isEmpty {
848+
if let platforms = condition?.platformNames.compactMap({ platformRegistry.platformByName[$0] }), !platforms.isEmpty {
849849
let condition = PlatformsCondition(platforms: platforms)
850850
conditions.append(condition)
851851
}

0 commit comments

Comments
 (0)