Skip to content

Commit be6d761

Browse files
author
Chris Adamson
committed
Improve code snippet in AsyncThrowingStream docs.
1 parent d5ff5ee commit be6d761

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
278278
/// let random = Int.random(in: 1...10)
279279
/// if (random % 5 == 0) {
280280
/// continuation.finish(throwing: MyRandomNumberError())
281-
/// break
281+
/// return
282282
/// } else {
283283
/// continuation.yield(random)
284284
/// }

0 commit comments

Comments
 (0)