vec1
a std Vec wrapper assuring that it has at least 1 element
1.12.1
11M downloads/mo
#2979 most downloaded on crates.io
rustonaut/vec1
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 6 weeks to 1.6 years
Most releases are documented
notes for 15 of 17 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
17 releases · first in 2018
0 releases in the last 12 months
see the full history below
Release timeline
17 releases · Jun 2018 to May 2024Releases
latest 17-
1.12.125 May 2024 -
1.12.027 Mar 2024 -
1.11.123 Mar 2024 -
1.11.023 Mar 2024Release notes
Open source →- Increased minimal rust version to 1.74.
- Relax lifetime constraints on
{try_,}mapped_{ref,mut} - Added new proxy functions for
Vectry_reservetry_reserve_exactshrink_tospare_capacity_mutextend_from_withinretain_mut
- Added missing proxy trait impls
impl<T, const N: usize> TryFrom<Vec1<T>> for Box<[T; N]>impl<T, const N: usize> TryFrom<&[T; N]> for Vec1<T> where T: Cloneimpl<T, const N: usize> TryFrom<&mut [T; N]> for Vec1<T> where T: Clone
- Removed no longer needed import/impl workaround.
- Added multiple
_nonzeroimplementationstruncate_nonzeroresize_with_nonzeroresize_nonzero
Release notes
Open source →- Increased minimal rust version to 1.74.
- Relax lifetime constraints on
{try_,}mapped_{ref,mut}. - Added new proxy functions for
Vectry_reservetry_reserve_exactshrink_tospare_capacity_mutextend_from_withinretain_mut
- Added missing proxy trait impls
impl<T, const N: usize> TryFrom<Vec1<T>> for Box<[T; N]>impl<T, const N: usize> TryFrom<&[T; N]> for Vec1<T> where T: Cloneimpl<T, const N: usize> TryFrom<&mut [T; N]> for Vec1<T> where T: Clone
- Removed no longer needed import/impl workaround.
- Added multiple
_nonzeroimplementationstruncate_nonzeroresize_with_nonzeroresize_nonzero
-
1.10.121 Oct 2022 -
1.10.021 Oct 2022Release notes
Open source →- Increased minimal rust version to 1.57.
- Added a length>0 aware
reduce,reduce_ref,reduce_mut. - Added
smallvec1_inline!. - Added
SmallVec1::from_array_const().
-
1.9.016 Oct 2022Release notes
Open source →- Increased minimal rust version to 1.56.
- Added missing LICENSE-MIT,LICENSE-APACHE files. Licensing did not change.
- Added
from_vec_pushandfrom_vec_insertconstructors. - Use edition 2021.
- Impl
TryFromfor[T; N]forVec1<T>/SmallVec1<T>using const generic.
Release notes
Open source →- Increased minimal rust version to 1.56.
- Added missing LICENSE-MIT,LICENSE-APACHE files. Licensing did not change.
- Added
from_vec_pushandfrom_vec_insertconstructors. - Use edition 2021.
- Impl
TryFromfor[T; N]forVec1<T>/SmallVec1<T>using const generic.
-
1.8.021 Mar 2021Release notes
Open source →- minimal rust version is now 1.48
- updated documentation
- more tests
- deprecated the
try_prefix usage as it created ambiguities with
other potentialtry_versions (like try and don't panic if out of
bounds or try and don't panic if allocation fails). - some missing methods and trait implementations (e.g. `drain)
- fixed bug in
Vec1.splice()which caused the code to return
aSize0Errorin a very specific edge case where it should
have panicked due to a out of bounds range likeVec.splice()
does.
Release notes
Open source →- minimal rust version is now 1.48
- updated documentation
- more tests
- deprecated the
try_prefix usage as it created ambiguities with other potentialtry_versions (like try and don't panic if out of bounds or try and don't panic if allocation fails). - some missing methods and trait implementations (e.g. `drain)
- fixed bug in
Vec1.splice()which caused the code to return aSize0Errorin a very specific edge case where it should have panicked due to a out of bounds range likeVec.splice()does.
-
1.6.011 Aug 2020 -
1.5.101 Jul 2020Release notes
Open source →- Updated project to
edition="2018"(not that this is
a purely internal change and doesn't affect the API
interface or minimal supported rustc version) - Added CONTRIBUTORS.md
- Updated README.md
Release notes
Open source →- Updated project to
edition="2018"(not that this is a purely internal change and doesn't affect the API interface or minimal supported rustc version) - Added CONTRIBUTORS.md
- Updated README.md
- Updated project to
-
1.5.021 May 2020Release notes
Open source →- minimal rust version is now 1.34
TryFromis no longer feature gatedvec1![]now allows trailing,in all casesSize0Errornow no longer has a custom
std::error::Error::description()implementation.- fixed various clippy::pedantic warnings
- updated
Cargo.toml cargo fmt
Release notes
Open source →- minimal rust version is now 1.34
TryFromis no longer feature gatedvec1![]now allows trailing,in all casesSize0Errornow no longer has a customstd::error::Error::description()implementation.- fixed various clippy::pedantic warnings
- updated
Cargo.toml cargo fmt
-
1.4.026 Mar 2019 -
1.3.021 Mar 2019Release notes
Open source →New manual proxy methods:
- splice
- to_asci_lowercase
- to_ascii_uppercase
New Into impl for following types:
- Rc<[T]>
- Arc<[T]>
- Box<[T]>
- VecDeque<T>
Unstable/Nightly features
New TryFrom impl for following types:
- Box<[T]>
- BinaryHeap<T>
- VecDeque<T>
- String
- &str
- &[T] where T: Clone
- &mut [T] where T: Clone
-
1.2.020 Mar 2019Release notes
Open source →- Added new
try_from_vecwhich returns aResult<Vec1<T>, Size0Error>. - Deprecated
from_vecas it doesn't return a error type as error.
Unstable/Nightly features
- New
unstable-nightly-try-from-implfeature which adds aTryFrom<Vec<T>>implementation.
- Added new
-
1.1.024 Jul 2018 -
1.0.112 Jun 2018Nothing published for this version
-
1.0.011 Jun 2018Nothing published for this version