Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the StreamChunks trait architecture by introducing a new Chunks trait and splitting streaming logic from source implementations. The main changes include:
- Introducing a new
Chunkstrait with astreammethod that takes object pool, options, and callbacks - Converting
StreamChunks::stream_chunksto returnBox<dyn Chunks + 'a>instead of directly streaming - Removing the
rope()method from theSourcetrait - Changing
BoxSourcefromArc<dyn Source>toBox<dyn Source>
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/compat_source.rs | Commented out entire test file |
| src/source_map_source.rs | Updated to use new Chunks trait pattern with SourceMapSourceChunks wrapper |
| src/source.rs | Removed rope() method, changed BoxSource from Arc to Box, updated StreamChunks trait signature |
| src/replace_source.rs | Introduced ReplaceSourceChunks wrapper, removed rope() implementation, contains typo "chunsk" |
| src/raw_source.rs | Added RawStringChunks and RawBufferSourceChunks wrappers using new Chunks trait |
| src/original_source.rs | Added OriginalSourceChunks wrapper, updated to use new Chunks trait |
| src/lib.rs | Exported new Chunks trait in stream_chunks module |
| src/helpers.rs | Introduced Chunks trait, updated get_map and stream_and_get_source_and_map signatures |
| src/concat_source.rs | Added ConcatSourceChunks wrapper, removed rope() implementation |
| src/cached_source.rs | Added CachedSourceChunks wrapper, commented out test, removed rope() usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a1bad22 to
10c1172
Compare
10c1172 to
aff485f
Compare
CodSpeed Performance ReportMerging #200 will improve performances by 49.63%Comparing Summary
Benchmarks breakdown
Footnotes
|
4f17f19 to
c5719e7
Compare
c5719e7 to
a6acd0e
Compare
ahabhgk
approved these changes
Nov 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the
StreamChunkstrait architecture by introducing a newChunkstrait and splitting streaming logic from source implementations. The main changes include:Chunkstrait with astreammethod that takes object pool, options, and callbacksStreamChunks::stream_chunksto returnBox<dyn Chunks + 'a>instead of directly streamingrope()method from theSourcetraitBoxSourcefromArc<dyn Source>toBox<dyn Source>