Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

correct `From<SmallVec<T, N, A>> for Box<[T]>` implementation

Open Beginner friendly
#714 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@HarshRajSinghania is already working on this.

Since Oct 4, 2026.

  • #732 by @HarshRajSinghania — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start in conversions.rs and compare the existing conversion with other allocator-aware implementations. Update the SmallVec-to-box conversion so the allocator is preserved without an intermediate Vec, then verify the resulting Box uses the original allocator and add or adjust focused coverage for this conversion.

Written by the indexing model from the issue text.

Description

good first issue help wanted r-feature

the current implementation on conversions.rs:

impl<T, const N: usize, A: Allocator> From<SmallVec<T, N, A>> for Box<[T]> {
    fn from(this: SmallVec<T, N, A>) -> Self {
        Vec::from(this).into_boxed_slice()
    }
}

first converts it to a Vec and changes the allocator before converting it into a box in Global

the correct implementation should preserve the allocator and not make use of an intermediary Vec:

impl<T, const N: usize, A: Allocator> From<SmallVec<T, N, A>> for Box<[T], A>
Dominant language
Rust
Stars
1.7k
Forks
225
Avg merge
1d 1h
Merged PRs (30d)
64

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from servo/rust-smallvec

All issues in servo/rust-smallvec

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.