From 4ad31988355d8820c797dc8c7bf71a69c9e38f69 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Mon, 11 Sep 2023 23:39:31 +0100 Subject: [PATCH] Make AsyncSequenceResponseBodyStreamer public --- .../AsyncAwaitSupport/ResponseGenerator+async.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Hummingbird/AsyncAwaitSupport/ResponseGenerator+async.swift b/Sources/Hummingbird/AsyncAwaitSupport/ResponseGenerator+async.swift index 13b583439..0c834f0c5 100644 --- a/Sources/Hummingbird/AsyncAwaitSupport/ResponseGenerator+async.swift +++ b/Sources/Hummingbird/AsyncAwaitSupport/ResponseGenerator+async.swift @@ -15,14 +15,14 @@ import HummingbirdCore /// Response body streamer which uses an AsyncSequence as its input. @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) -final class AsyncSequenceResponseBodyStreamer: HBResponseBodyStreamer where ByteBufferSequence.Element == ByteBuffer { +public final class AsyncSequenceResponseBodyStreamer: HBResponseBodyStreamer where ByteBufferSequence.Element == ByteBuffer { var iterator: ByteBufferSequence.AsyncIterator - init(_ asyncSequence: ByteBufferSequence) { + public init(_ asyncSequence: ByteBufferSequence) { self.iterator = asyncSequence.makeAsyncIterator() } - func read(on eventLoop: EventLoop) -> EventLoopFuture { + public func read(on eventLoop: EventLoop) -> EventLoopFuture { let promise = eventLoop.makePromise(of: HBStreamerOutput.self) promise.completeWithTask { if let buffer = try await self.iterator.next() {