Skip to content

Commit 45aea1e

Browse files
authored
Merge pull request #62685 from Jager-yoo/fix-concurrency-doc
[stdlib] Correct actual print outputs in Concurrency files
2 parents bb7217e + 9b2b8b3 commit 45aea1e

15 files changed

+20
-20
lines changed

stdlib/public/Concurrency/AsyncCompactMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension AsyncSequence {
3838
/// for await numeral in stream {
3939
/// print(numeral, terminator: " ")
4040
/// }
41-
/// // Prints "I II III V"
41+
/// // Prints "I II III V "
4242
///
4343
/// - Parameter transform: A mapping closure. `transform` accepts an element
4444
/// of this sequence as its parameter and returns a transformed value of the

stdlib/public/Concurrency/AsyncDropFirstSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension AsyncSequence {
2727
/// for await number in Counter(howHigh: 10).dropFirst(3) {
2828
/// print(number, terminator: " ")
2929
/// }
30-
/// // Prints "4 5 6 7 8 9 10"
30+
/// // Prints "4 5 6 7 8 9 10 "
3131
///
3232
/// If the number of elements to drop exceeds the number of elements in the
3333
/// sequence, the result is an empty sequence.

stdlib/public/Concurrency/AsyncDropWhileSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension AsyncSequence {
3030
/// for await number in stream {
3131
/// print(number, terminator: " ")
3232
/// }
33-
/// // Prints "3 4 5 6 7 8 9 10"
33+
/// // Prints "3 4 5 6 7 8 9 10 "
3434
///
3535
/// After the predicate returns `false`, the sequence never executes it again,
3636
/// and from then on the sequence passes through elements from its underlying

stdlib/public/Concurrency/AsyncFilterSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension AsyncSequence {
2626
/// for await number in stream {
2727
/// print(number, terminator: " ")
2828
/// }
29-
/// // Prints "2 4 6 8 10"
29+
/// // Prints "2 4 6 8 10 "
3030
///
3131
/// - Parameter isIncluded: A closure that takes an element of the
3232
/// asynchronous sequence as its argument and returns a Boolean value

stdlib/public/Concurrency/AsyncFlatMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extension AsyncSequence {
3333
/// for await number in stream {
3434
/// print(number, terminator: " ")
3535
/// }
36-
/// // Prints "1 1 2 1 2 3 1 2 3 4 1 2 3 4 5"
36+
/// // Prints "1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 "
3737
///
3838
/// - Parameter transform: A mapping closure. `transform` accepts an element
3939
/// of this sequence as its parameter and returns an `AsyncSequence`.

stdlib/public/Concurrency/AsyncIteratorProtocol.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ import Swift
5757
///
5858
/// At the call site, this looks like:
5959
///
60-
/// for await i in Counter(howHigh: 10) {
61-
/// print(i, terminator: " ")
60+
/// for await number in Counter(howHigh: 10) {
61+
/// print(number, terminator: " ")
6262
/// }
63-
/// // Prints "1 2 3 4 5 6 7 8 9 10"
63+
/// // Prints "1 2 3 4 5 6 7 8 9 10 "
6464
///
6565
/// ### End of Iteration
6666
///

stdlib/public/Concurrency/AsyncMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension AsyncSequence {
3636
/// for await numeral in stream {
3737
/// print(numeral, terminator: " ")
3838
/// }
39-
/// // Prints "I II III (unknown) V"
39+
/// // Prints "I II III (unknown) V "
4040
///
4141
/// - Parameter transform: A mapping closure. `transform` accepts an element
4242
/// of this sequence as its parameter and returns a transformed value of the

stdlib/public/Concurrency/AsyncPrefixSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension AsyncSequence {
2727
/// for await number in Counter(howHigh: 10).prefix(6) {
2828
/// print(number, terminator: " ")
2929
/// }
30-
/// // Prints "1 2 3 4 5 6"
30+
/// // Prints "1 2 3 4 5 6 "
3131
///
3232
/// If the count passed to `prefix(_:)` exceeds the number of elements in the
3333
/// base sequence, the result contains all of the elements in the sequence.

stdlib/public/Concurrency/AsyncPrefixWhileSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extension AsyncSequence {
3131
/// for try await number in stream {
3232
/// print(number, terminator: " ")
3333
/// }
34-
/// // Prints "1 2 3 4 5"
34+
/// // Prints "1 2 3 4 5 "
3535
///
3636
/// - Parameter predicate: A closure that takes an element as a parameter and
3737
/// returns a Boolean value indicating whether the element should be

stdlib/public/Concurrency/AsyncSequence.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import Swift
2727
/// over `Counter`, a custom `AsyncSequence` that produces `Int` values from
2828
/// `1` up to a `howHigh` value:
2929
///
30-
/// for await i in Counter(howHigh: 10) {
31-
/// print(i, terminator: " ")
30+
/// for await number in Counter(howHigh: 10) {
31+
/// print(number, terminator: " ")
3232
/// }
33-
/// // Prints "1 2 3 4 5 6 7 8 9 10"
33+
/// // Prints "1 2 3 4 5 6 7 8 9 10 "
3434
///
3535
/// An `AsyncSequence` doesn't generate or contain the values; it just defines
3636
/// how you access them. Along with defining the type of values as an associated
@@ -69,7 +69,7 @@ import Swift
6969
/// for await s in stream {
7070
/// print(s, terminator: " ")
7171
/// }
72-
/// // Prints "Odd Even Odd Even Odd Even Odd Even Odd Even"
72+
/// // Prints "Odd Even Odd Even Odd Even Odd Even Odd Even "
7373
///
7474
@available(SwiftStdlib 5.1, *)
7575
@rethrows

stdlib/public/Concurrency/AsyncThrowingCompactMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extension AsyncSequence {
4747
/// } catch {
4848
/// print("Error: \(error)")
4949
/// }
50-
/// // Prints "I II III Error: MyError()"
50+
/// // Prints "I II III Error: MyError() "
5151
///
5252
/// - Parameter transform: An error-throwing mapping closure. `transform`
5353
/// accepts an element of this sequence as its parameter and returns a

stdlib/public/Concurrency/AsyncThrowingFilterSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension AsyncSequence {
3636
/// } catch {
3737
/// print("Error: \(error)")
3838
/// }
39-
/// // Prints "2 4 Error: MyError()"
39+
/// // Prints "2 4 Error: MyError() "
4040
///
4141
/// - Parameter isIncluded: An error-throwing closure that takes an element
4242
/// of the asynchronous sequence as its argument and returns a Boolean value

stdlib/public/Concurrency/AsyncThrowingFlatMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extension AsyncSequence {
4444
/// } catch {
4545
/// print(error)
4646
/// }
47-
/// // Prints "1 1 2 1 2 3 MyError()"
47+
/// // Prints "1 1 2 1 2 3 MyError() "
4848
///
4949
/// - Parameter transform: An error-throwing mapping closure. `transform`
5050
/// accepts an element of this sequence as its parameter and returns an

stdlib/public/Concurrency/AsyncThrowingMapSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extension AsyncSequence {
4848
/// } catch {
4949
/// print("Error: \(error)")
5050
/// }
51-
/// // Prints "I II III Error: MyError()"
51+
/// // Prints "I II III Error: MyError() "
5252
///
5353
/// - Parameter transform: A mapping closure. `transform` accepts an element
5454
/// of this sequence as its parameter and returns a transformed value of the

stdlib/public/Concurrency/AsyncThrowingPrefixWhileSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extension AsyncSequence {
4141
/// } catch {
4242
/// print("Error: \(error)")
4343
/// }
44-
/// // Prints "1 2 3 4 Error: MyError()"
44+
/// // Prints "1 2 3 4 Error: MyError() "
4545
///
4646
/// - Parameter predicate: A error-throwing closure that takes an element of
4747
/// the asynchronous sequence as its argument and returns a Boolean value

0 commit comments

Comments
 (0)