File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ import Swift
14
14
15
15
@available ( SwiftStdlib 5 . 1 , * )
16
16
extension AsyncSequence {
17
+ @available ( * , deprecated, renamed: " prefix(while:) " )
18
+ @preconcurrency
19
+ @inlinable
20
+ public __consuming func prefix(
21
+ while predicate: @Sendable @escaping ( Element) async -> Bool
22
+ ) rethrows -> AsyncPrefixWhileSequence < Self > {
23
+ return AsyncPrefixWhileSequence ( self , predicate: predicate)
24
+ }
17
25
/// Returns an asynchronous sequence, containing the initial, consecutive
18
26
/// elements of the base sequence that satisfy the given predicate.
19
27
///
@@ -42,7 +50,7 @@ extension AsyncSequence {
42
50
@inlinable
43
51
public __consuming func prefix(
44
52
while predicate: @Sendable @escaping ( Element) async -> Bool
45
- ) rethrows -> AsyncPrefixWhileSequence < Self > {
53
+ ) -> AsyncPrefixWhileSequence < Self > {
46
54
return AsyncPrefixWhileSequence ( self , predicate: predicate)
47
55
}
48
56
}
You can’t perform that action at this time.
0 commit comments