From 0d4345ef22da80db778bfd98009f472456bfd966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Heidekr=C3=BCger?= Date: Wed, 2 Oct 2024 21:33:00 -0700 Subject: [PATCH] EventStream: remove `predicate` property in `ServerSentEventsDeserializationSequence` iterator --- .../EventStreams/ServerSentEventsDecoding.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift b/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift index 7c50a34..cb0edcd 100644 --- a/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift +++ b/Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift @@ -58,11 +58,6 @@ extension ServerSentEventsDeserializationSequence: AsyncSequence { /// The state machine of the iterator. var stateMachine: StateMachine - /// A closure that determines whether the given byte chunk should be forwarded to the consumer. - /// - Parameter: A byte chunk. - /// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence. - let predicate: (ArraySlice) -> Bool - /// Creates a new sequence. /// - Parameters: /// - upstream: The upstream sequence of arbitrary byte chunks. @@ -70,7 +65,6 @@ extension ServerSentEventsDeserializationSequence: AsyncSequence { init(upstream: UpstreamIterator, while predicate: @escaping ((ArraySlice) -> Bool)) { self.upstream = upstream self.stateMachine = .init(while: predicate) - self.predicate = predicate } /// Asynchronously advances to the next element and returns it, or ends the