Skip to content

Allow ReaderSegments to be implemented for references to unsized ReaderSegments#546

Merged
dwrensha merged 1 commit intocapnproto:masterfrom
ypoluektovich:patch-1
Mar 2, 2025
Merged

Allow ReaderSegments to be implemented for references to unsized ReaderSegments#546
dwrensha merged 1 commit intocapnproto:masterfrom
ypoluektovich:patch-1

Conversation

@ypoluektovich
Copy link
Contributor

Currently &[&[u8]] does not implement ReaderSegments despite [&[u8]] implementing it, because [&[u8]] is not Sized. SegmentArray exists to overcome this, but there's doesn't seem to be a need for forcing Sized, as all methods of ReaderSegments accept Self via a reference.

…erSegments

Currently `&[&[u8]]` does not implement `ReaderSegments` despite `[&[u8]]` implementing it, because `[&[u8]]` is not `Sized`. `SegmentArray` exists to overcome this, but there's doesn't seem to be a need for forcing `Sized`, as all methods of `ReaderSegments` accept `Self` via a reference.
@codecov
Copy link

codecov bot commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.38%. Comparing base (ab342b3) to head (dacf631).
Report is 126 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
+ Coverage   51.64%   52.38%   +0.73%     
==========================================
  Files          69       70       +1     
  Lines       33735    34587     +852     
==========================================
+ Hits        17422    18117     +695     
- Misses      16313    16470     +157     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dwrensha dwrensha merged commit 823602f into capnproto:master Mar 2, 2025
10 checks passed
@dwrensha
Copy link
Member

dwrensha commented Mar 2, 2025

Thanks!

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