Skip to content

feat: add From<Box<[T]>> conversion for SmallVec (#716) - #752

Merged
alejandro-vaz merged 1 commit into
servo:v2from
Ankit-cs:v2
Oct 8, 2026
Merged

alejandro-vaz merged 1 commit into
servo:v2from
Ankit-cs:v2

Conversation

@Ankit-cs

@Ankit-cs Ankit-cs commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This PR implements the missing From<Box<[T]>> trait conversion for SmallVec<T, N>, as requested in #716.

The implementation mirrors the existing reverse conversion that was already present in src/conversions.rs. It leverages Self::from_vec(boxed.into_vec()) to efficiently convert the boxed slice, preventing unnecessary overhead.

Testing Done
Tested locally via cargo test, ensuring all unit and integration tests successfully pass.
Verified that all documentation tests (cargo test --doc) pass.

@Ankit-cs

Ankit-cs commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

looking for feedback @alejandro-vaz sir

@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.

we'll keep it like that for now

if necessary we can change it later

thanks @Ankit-cs

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Oct 8, 2026
Merged via the queue into servo:v2 with commit 831f193 Oct 8, 2026
8 checks passed
@Ankit-cs

Ankit-cs commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @alejandro-vaz sir for giving a chance

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