1
1
//===----------------------------------------------------------------------===//
2
2
//
3
- // This source file is part of the Swift.org open source project
3
+ // This source file is part of the Swift Async Algorithms open source project
4
4
//
5
- // Copyright (c) 2024 Apple Inc. and the Swift project authors
5
+ // Copyright (c) 2022 Apple Inc. and the Swift project authors
6
6
// Licensed under Apache License v2.0 with Runtime Library Exception
7
7
//
8
8
// See https://swift.org/LICENSE.txt for license information
9
- // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
9
//
11
10
//===----------------------------------------------------------------------===//
12
11
@@ -21,7 +20,9 @@ extension AsyncSequence {
21
20
///
22
21
/// Use the ``mapError(_:)`` operator when you need to replace one error type with another.
23
22
@available ( AsyncAlgorithms 1 . 1 , * )
24
- public func mapError< MappedError: Error > ( _ transform: @Sendable @escaping ( Failure) async -> MappedError ) -> AsyncMapErrorSequence < Self , MappedError > {
23
+ public func mapError< MappedError: Error > (
24
+ _ transform: @Sendable @escaping ( Failure) async -> MappedError
25
+ ) -> AsyncMapErrorSequence < Self , MappedError > {
25
26
AsyncMapErrorSequence ( base: self , transform: transform)
26
27
}
27
28
}
@@ -45,7 +46,7 @@ public struct AsyncMapErrorSequence<Base: AsyncSequence, MappedError: Error> {
45
46
}
46
47
47
48
@available ( AsyncAlgorithms 1 . 1 , * )
48
- extension AsyncMapErrorSequence : AsyncSequence {
49
+ extension AsyncMapErrorSequence : AsyncSequence {
49
50
50
51
/// The iterator that produces elements of the map sequence.
51
52
public struct Iterator : AsyncIteratorProtocol {
@@ -85,8 +86,8 @@ extension AsyncMapErrorSequence: AsyncSequence {
85
86
}
86
87
87
88
@available ( AsyncAlgorithms 1 . 1 , * )
88
- extension AsyncMapErrorSequence : Sendable where Base: Sendable { }
89
+ extension AsyncMapErrorSequence : Sendable where Base: Sendable { }
89
90
90
91
@available ( * , unavailable)
91
- extension AsyncMapErrorSequence . Iterator : Sendable { }
92
+ extension AsyncMapErrorSequence . Iterator : Sendable { }
92
93
#endif
0 commit comments