Skip to content

[AsyncStreaming] Redesign AsyncReader.collect to take a target container#436

Merged
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-collect-overhaul
Jun 25, 2026
Merged

[AsyncStreaming] Redesign AsyncReader.collect to take a target container#436
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-collect-overhaul

Conversation

@FranzBusch

Copy link
Copy Markdown
Member

Replace collect(upTo:body:) with three target-based overloads: collect(into:), collect(exactlyInto:), and collect(into:maximumSize:). Add AsyncReaderInsufficientElementsError for the exact-match shortfall case.

Replace `collect(upTo:body:)` with three target-based overloads: `collect(into:)`, `collect(exactlyInto:)`, and `collect(into:maximumSize:)`. Add `AsyncReaderInsufficientElementsError` for the exact-match shortfall case.
@FranzBusch FranzBusch requested a review from Catfish-Man June 24, 2026 11:47
@Catfish-Man

Copy link
Copy Markdown
Member

Yeah this looks great. Thank you!

@FranzBusch FranzBusch merged commit 3da39bb into apple:main Jun 25, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants