-
Notifications
You must be signed in to change notification settings - Fork 187
Home
Alejandro Vaz edited this page Aug 24, 2026
·
10 revisions
the original specification was written long ago by Matt, all of which is already implemented except for the allocator API (on #387).
These are changes that weren't ready in time for 1.0 (#73).
Forward port changes from the v1 branch:
- bincode2 support Implement bincode2 encode/decode support for smallvec v1 #375
Requires newer version of Rust than current minimum (1.36):
- Use const generics to change
SmallVec<[T; N]>toSmallVec<T, N>. Remove theArraytrait. (RFC: rewrite based on min_const_generics for 2.0 #240, Rust 1.51).[x] Use theunionrepresentation by default and remove the optionalunionfeature added in Use a union to reduce the size of SmallVec [v2] #94 (Rust 1.49).[x] MakeSmallVec::newaconst fn(MakeSmallVec::newconst #263).Depends on unstable Rust features:
- Support custom allocators (Support parametric allocators #55, Allocator traits and std::heap rust-lang/rust#32838).[ ] Use specialization to optimize
extend,insert_many, andfromfor slices ofCopytypes. Deprecate and removeextend_from_slice,insert_from_slice, andfrom_slice(Rework specialization #384, Tracking issue for specialization (RFC 1210) rust-lang/rust#31844).[x] Implement theErrortrait without requiringstd(Implementstd::error::ErrorforCollectionAllocErr#355, Tracking Issue forErrorincorerust-lang/rust#103765).Breaking API changes:
- Fix variance of
SmallVec<[T; N]>overT(SmallVec<[T; N]> is invariant over T #146)?[x] Remove the deprecatedExtendFromSlicetrait.[x] Remove unused&selfparameter frominline_sizemethod.[x] Deprecate thewritefeature and add astdfeature instead (Implementstd::error::ErrorforCollectionAllocErr#355, feat: replacewritefeature withstdfeature #356).[x] Remove the non-standardinsert_manymethod (Deprecate insert_many (and add splice?) #255)?
major changes v2 will introduce
- allocator API
- const generics type signature
- removal of unnecessary macros
- better const fn support
- specialization
- vec parity API
for the current status of v2, see its tracking issue