Skip to content

Commit 62bb429

Browse files
committed
Fix up docs
1 parent 60f808c commit 62bb429

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ where Upstream.Element == ArraySlice<UInt8> {
2929
private let upstream: Upstream
3030

3131
/// A closure that determines whether the given byte chunk should be forwarded to the consumer.
32-
/// - Parameter: A byte chunk.
33-
/// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence.
32+
///
33+
/// The closure should return `true` if the byte chunk should be forwarded and
34+
/// `false` if this byte chunk is the terminating sequence.
3435
private let predicate: @Sendable (ArraySlice<UInt8>) -> Bool
3536

3637
/// Creates a new sequence.
@@ -98,7 +99,7 @@ extension AsyncSequence where Element == ArraySlice<UInt8>, Self: Sendable {
9899
/// Returns another sequence that decodes each event's data as the provided type using the provided decoder.
99100
///
100101
/// Use this method if the event's `data` field is not JSON, or if you don't want to parse it using `asDecodedServerSentEventsWithJSONData`.
101-
/// - Parameter: A closure that determines whether the given byte chunk should be forwarded to the consumer.
102+
/// - Parameter predicate: A closure that determines whether the given byte chunk should be forwarded to the consumer.
102103
/// - Returns: A sequence that provides the events.
103104
public func asDecodedServerSentEvents(
104105
while predicate: @escaping @Sendable (ArraySlice<UInt8>) -> Bool = { _ in true }

0 commit comments

Comments
 (0)