This is a list of breaking changes that we would like to make before stabilizing the API for smallvec 1.0. Increases the minimum Rust version from 1.20: - [x] Use the `alloc` crate for `no_std` compatibility (#159, Requires Rust 1.36). - [x] Replace `mem::uninitialized` with `MaybeUninit` (#126, Requires Rust 1.36). - [x] Use `NonNull<T>` instead of `*mut T` (#171, Requires Rust 1.25). - [x] Replace the `unreachable` crate with `std::hint::unreachable_unchecked` (#128, Requires Rust 1.27). Breaking API changes: - [x] Change `drain` method to take a `RangeBounds` argument (#142, Requires Rust 1.28). Deprecations: - [x] Remove deprecated `SmallVecN` type aliases. - [x] Remove deprecated `push_all_move` method. - [x] Remove deprecated `VecLike` trait. Still depends on unstable Rust features. Postpone until 2.0: - [ ] Use const generics to change `SmallVec<[T; N]>` to `SmallVec<T, N>`. Remove the `Array` trait. (rust-lang/rust#44580). - [ ] Support custom allocators (#55, rust-lang/rust#32838). - [ ] Use specialization to optimize `extend`, `insert_many`, and `from` for slices of `Copy` types. Deprecate and remove `extend_from_slice`, `insert_from_slice`, and `from_slice` (rust-lang/rust#31844). - [ ] Use the `union` representation by default and remove the optional `union` feature added in #94 (rust-lang/rust#32836).
This is a list of breaking changes that we would like to make before stabilizing the API for smallvec 1.0.
Increases the minimum Rust version from 1.20:
alloccrate forno_stdcompatibility (alloc is now stable #159, Requires Rust 1.36).mem::uninitializedwithMaybeUninit(Possible UB from use of uninitialized[&T; N]#126, Requires Rust 1.36).NonNull<T>instead of*mut T(Use NonNull instead of a raw pointer #171, Requires Rust 1.25).unreachablecrate withstd::hint::unreachable_unchecked(Maybe remove the 'unreachable' crate dependency? #128, Requires Rust 1.27).Breaking API changes:
drainmethod to take aRangeBoundsargument (change drain to be consistent withVec#142, Requires Rust 1.28).Deprecations:
SmallVecNtype aliases.push_all_movemethod.VecLiketrait.Still depends on unstable Rust features. Postpone until 2.0:
SmallVec<[T; N]>toSmallVec<T, N>. Remove theArraytrait. (Tracking issue for const generics (RFC 2000) rust-lang/rust#44580).extend,insert_many, andfromfor slices ofCopytypes. Deprecate and removeextend_from_slice,insert_from_slice, andfrom_slice(Tracking issue for specialization (RFC 1210) rust-lang/rust#31844).unionrepresentation by default and remove the optionalunionfeature added in Use a union to reduce the size of SmallVec [v2] #94 (Untagged unions (tracking issue for RFC 1444) rust-lang/rust#32836).