From aa4760d60309ec33747b15446fd9f9ae8b6b6ddc Mon Sep 17 00:00:00 2001 From: Dimitri Bouniol Date: Wed, 17 Nov 2021 23:53:08 -0800 Subject: [PATCH 1/2] Fixed a documentation typo --- Sources/AsyncSequenceReader/AsyncReadUpToCountSequence.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]? { From da495e8860a888549f9d8c0ef97b7cf053d705fb Mon Sep 17 00:00:00 2001 From: Dimitri Bouniol Date: Wed, 17 Nov 2021 22:07:42 -0800 Subject: [PATCH 2/2] Added more tests --- Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift | 2 ++ 1 file changed, 2 insertions(+) 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 {