Skip to content

fix: refactor taggedlen/rawsmallvec and visibility - #512

Merged
alejandro-vaz merged 4 commits into
servo:v2from
alejandro-vaz:librefactor
Aug 31, 2026
Merged

alejandro-vaz merged 4 commits into
servo:v2from
alejandro-vaz:librefactor

Conversation

@alejandro-vaz

@alejandro-vaz alejandro-vaz commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

this PR refactors TaggedLen and RawSmallVec exclusively to address visibility issues

  • moves the RawSmallVec implementation into rawsmallvec.rs
  • moves TaggedLen and its implementations to taggedlen.rs
  • makes RawSmallVec implementation methods public
  • allows TaggedLen to be exported under the internals feature

RawSmallVec methods are made public so they can be seen when exported under the internals feature to downstream crates

consequently, TaggedLen needs to be made public in order to allow the try_grow_raw method in RawSmallVec to be public and callable

note: borsh.rs has been changed in order not to use the first field, which was incorrect. using the first field also meant that it had to be made public but it is kept private. this is also implemented in #506 but I had to port it here

@alejandro-vaz
alejandro-vaz requested a review from jdm August 30, 2026 17:44
@alejandro-vaz alejandro-vaz self-assigned this Aug 30, 2026
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Aug 31, 2026
Merged via the queue into servo:v2 with commit e26ef6f Aug 31, 2026
6 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