Skip to content

Move ToStreamBuilder's container builder to method generic#792

Merged
frankmcsherry merged 2 commits into
TimelyDataflow:masterfrom
antiguru:to-stream-builder-ergonomics
May 28, 2026
Merged

Move ToStreamBuilder's container builder to method generic#792
frankmcsherry merged 2 commits into
TimelyDataflow:masterfrom
antiguru:to-stream-builder-ergonomics

Conversation

@antiguru
Copy link
Copy Markdown
Member

Generic-over-Item trait with method-level CB enables method-call syntax (0..3).to_stream_with_builder::<_, CB>(scope) instead of the UFCS form ToStreamBuilder::<CB>::to_stream_with_builder(...).

Breaking change to a public trait signature; CHANGELOG updated. Version bump handled separately.

Generic-over-Item trait with method-level CB enables method-call
syntax `(0..3).to_stream_with_builder::<_, CB>(scope)` instead of
the UFCS form `ToStreamBuilder::<CB>::to_stream_with_builder(...)`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@antiguru antiguru marked this pull request as ready for review May 15, 2026 15:13
Comment thread timely/src/dataflow/operators/core/to_stream.rs Outdated
Per review feedback: each implementor of `ToStreamBuilder` has exactly
one item type (`I::Item` for the blanket impl), so an associated type
fits better than a trait-level generic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@frankmcsherry frankmcsherry merged commit c4f42a8 into TimelyDataflow:master May 28, 2026
9 checks passed
@antiguru antiguru deleted the to-stream-builder-ergonomics branch May 28, 2026 19:30
@github-actions github-actions Bot mentioned this pull request May 23, 2026
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