Skip to content

Add From<SmallVec> implementations for Vec and Box<[T]> - #649

Draft
shuaixr wants to merge 1 commit into
servo:v2from
shuaixr:feat/from-smallvec-for-vec-box
Draft

shuaixr wants to merge 1 commit into
servo:v2from
shuaixr:feat/from-smallvec-for-vec-box

Conversation

@shuaixr

@shuaixr shuaixr commented Sep 21, 2026

Copy link
Copy Markdown

Closes: #633
Implemented the From trait for converting SmallVec into Vec and Box<[T]> using the existing into methods, and added tests for both.

feedback and suggestions are welcome!

@shuaixr
shuaixr marked this pull request as ready for review September 21, 2026 00:28
@alejandro-vaz
alejandro-vaz self-requested a review September 21, 2026 09:33

@alejandro-vaz alejandro-vaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR is blocked by #632

we're still not sure of how to fix it but the logical fix would be to have two box and two vec conversions, one for the normal alloc and the other for the allocator-api supplied box/vec

@shuaixr

shuaixr commented Sep 21, 2026

Copy link
Copy Markdown
Author

Oh yes, I overlooked that.
I can update the implementation once #632 is resolved.

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

I'm making the PR as a draft since it is blocked

to have it mentally checked in

@alejandro-vaz
alejandro-vaz marked this pull request as draft September 21, 2026 13:53
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.

add missing From conversions to SmallVec

2 participants