Skip to content

Commit ca31786

Browse files
paulhdkczechboy0
andauthored
Remove redundant forced type cast in Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift
Co-authored-by: Honza Dvorsky <honza@apple.com>
1 parent 4cc50c5 commit ca31786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ extension ServerSentEventsDeserializationSequence: AsyncSequence {
6363
/// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence.
6464
let predicate: (ArraySlice<UInt8>) -> Bool
6565

66-
init(upstream: any AsyncIteratorProtocol, while predicate: @escaping ((ArraySlice<UInt8>) -> Bool)) {
67-
self.upstream = upstream as! UpstreamIterator
66+
init(upstream: UpstreamIterator, while predicate: @escaping ((ArraySlice<UInt8>) -> Bool)) {
67+
self.upstream = upstream
6868
self.stateMachine = .init(while: predicate)
6969
self.predicate = predicate
7070
}

0 commit comments

Comments
 (0)