diff --git a/Sources/AsyncSequenceReader/AsyncReadUpToCountSequence.swift b/Sources/AsyncSequenceReader/AsyncReadUpToCountSequence.swift index 0b17bd9..4533466 100644 --- a/Sources/AsyncSequenceReader/AsyncReadUpToCountSequence.swift +++ b/Sources/AsyncSequenceReader/AsyncReadUpToCountSequence.swift @@ -12,7 +12,7 @@ extension AsyncIteratorProtocol { /// Asynchronously advances by the specified number of elements, or ends the sequence if there is no next element. /// /// If a complete array could not be collected, an error is thrown and the sequence should be considered finished. - /// - Parameter count: The number of bytes to collect. + /// - Parameter count: The number of elements to collect. /// - Returns: A collection with exactly `count` elements, or `nil` if the sequence is finished. /// - Throws: `AsyncSequenceReaderError.insufficientElements` if a complete byte sequence could not be returned by the time the sequence ended. public mutating func collect(_ count: Int) async throws -> [Element]? { diff --git a/Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift b/Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift index da4c839..c4b1df8 100644 --- a/Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift +++ b/Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift @@ -10,6 +10,8 @@ import XCTest @testable import AsyncSequenceReader final class AsyncSequenceReaderTests: XCTestCase { + + // test transform not called when stream is empty // MARK: - Test Manual Iteration func testReadSequenceFromStream() async throws {