Update and document serde support
* Document the optional 'serde' feature. Fixes#224.
* Disable unused serde features. This makes serde support compatible with `no_std`.
Deprecate and hide ExtendFromSlice trait
This trait is only needed for internal benchmarking and should not have been public. It will be removed in version 2.0.
Version 1.3.0
* Add a new unstable `const_generics` feature (#204).
* Improve inlining of constructor functions (#206).
* Add a `slice.to_smallvec()` convenience method (#203).
* Documentation and testing improvements.
Add #[inline] attribute to all fns which return SmallVec
When rustc fails to inline a `SmallVec` constructor, it can carry a significant performance cost: for example, if `SmallVec::<[i64; 128]>::from_iter(...)` fails to inline, it will perform an unnecessary 1kb memcpy.
I've recently been bitten by this when using `SmallVec` in a context where rustc seemed to be reluctant to perform inlining (a large fn with nested closures). Switching from `SmallVec::from_iter` to `SmallVec::new` and `push`, with a buffer size of 256 bytes, saved over 20ns per call. For larger buffers, `from_iter` carried a proportionally higher cost, even when the actual capacity in use didn't change.
Add support for constant generics
No breaking changes and no internal hacks. This PR only adds a feature to switch between implementations of the `Array` trait.
I personally think that this approach is pretty reasonable and should be at least considered for discussion.
Version 1.2.0
Changes in this release:
* `IntoIter` now implements `Debug` (#196).
* `smallvec!` macro is now easier to use in `no_std` contexts where the `vec!` macro isn't automatically imported (#198).
Changes in this release:
* `IntoIter` now implments `Debug` (#196).
* `smallvec!` macro is now easier to use in `no_std` contexts
where the `vec!` macro isn't automatically imported (#198).
Version 1.1.0
Changes in this release:
* Added new method `SmallVec::into_boxed_slice` (#190).
* Added new methods `IntoIter::as_slice` and `as_mut_slice` (#182).
* `IntoIter` now implements `Clone` (#192).
* Improved documentation and testing (#186, #189).
* Minor code cleanups (#176).
Also added a simple example to the README.