Skip to content

Commit 2b218e6

Browse files
committed
Account for flatMap changes
1 parent 510e7c2 commit 2b218e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stdlib/public/core/SequenceAlgorithms.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ extension Sequence {
725725
// overloads.
726726
@inline(__always)
727727
public func _flatMap<ElementOfResult>(
728-
_ transform: (${GElement}) throws -> ElementOfResult?
728+
_ transform: (Element) throws -> ElementOfResult?
729729
) rethrows -> [ElementOfResult] {
730730
var result: [ElementOfResult] = []
731731
for element in self {

stdlib/public/core/StringRangeReplaceableCollection.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extension String : StringProtocol {
4141
// and disambiguates between the following intitializers, now that String
4242
// conforms to Collection:
4343
// - init<T>(_ value: T) where T : LosslessStringConvertible
44-
// - init<S>(_ characters: S) where S : Sequence, S.Iterator.Element == Character
44+
// - init<S>(_ characters: S) where S : Sequence, S.Element == Character
4545
public init(_ other: String) {
4646
self.init(other._core)
4747
}
@@ -395,15 +395,15 @@ extension String {
395395
extension Sequence {
396396
@available(swift, obsoleted: 4)
397397
public func flatMap(
398-
_ transform: (Iterator.Element) throws -> String
398+
_ transform: (Element) throws -> String
399399
) rethrows -> [String] {
400400
return try map(transform)
401401
}
402402
}
403403

404404
extension Collection {
405405
public func flatMap(
406-
_ transform: (Iterator.Element) throws -> String?
406+
_ transform: (Element) throws -> String?
407407
) rethrows -> [String] {
408408
return try _flatMap(transform)
409409
}

0 commit comments

Comments
 (0)