NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3240 most downloaded on crates.io
Correct-by-construction non-empty collections.
Last release 2 months ago
28 Jul 2026
Release timing varies
gaps range from 2 weeks to 7 months
Nearly every release is documented
notes for 20 of 22 stable releases
3 versions withdrawn
withdrawn after publishing
4 years old
25 releases · first in 2023
One column per quarter.
vector: NEVec::reverse , mysteriously missing until this point.
NEVec::reverse, mysteriously missing until this point.rand::seq::SliceRandom, exposing a shuffle function for NEVec.NEBTreeSet and its macro nebts!.NEBTreeMap and its macro nebtm!.NEIndexSet and its macro neis!.ne_indexmap macro has a shorter alias neim and the original hasvector: NEVec::from_elem exposed for times when you want nev![foo; n] but n is not const .
NEVec::from_elem exposed for times when you want nev![foo; n] but n is not const.NESlice::last to match NEVec.Index impl has been generalized to accept more slice patterns.NonEmptyIterator::intersperse , finally! Iterator::intersperse within std is still not stabilized after years of waiting, and its annoying to depend o
Happy Remembrance Day.
NonEmptyIterator::intersperse, finally! Iterator::intersperse within stditertools just for this.FromNonEmptyIterator. You can now fold non-empty iteratorsString, BTreeMap, BTreeSet, PathBuf, and ().Nothing published for this version
Extend impls for NESet , NEMap , and NEIndexMap .
Singleton trait.NonEmptyIterator::unzip.Extend impls for NESet, NEMap, and NEIndexMap.Overly restrictive bounds on the PartialEq impl for NEMap .
AsRef impls.PartialEq impl for NEMap.Five months since the big changes and no major issues. If there are, we can now fix them in the normal Semver way.
Five months since the big changes and no major issues. If there are, we can now
fix them in the normal Semver way.
nev![a; n] syntax (similar to vec![a; n])iter_mut() to NEVec , NEMap , and NEIndexMap
iter_mut() to NEVec, NEMap, and NEIndexMappeekable() to NonEmptyIteratorremove(), swap_remove(), retain(), and retain_mut() to NEVec.AsRef<[T]> for NESlice.Huge thanks to Rinde van Lon for implementing the bulk of these new changes and additions. Thanks to him, the various non-empty collections now have m
Huge thanks to Rinde van Lon for implementing the bulk of these new changes and additions. Thanks to him, the various non-empty collections now have much better performance characteristics.
NonEmptyIterator:
NonEmptyIterator is now bounded by IntoIterator and has defaultNonEmptyIterator::first() is renamed to next() and the old implementation of next() is removed.NonEmptyIterator::all() now consumes selfNonEmptyIterator::any() now consumes selfNonEmptyIterator::nth() now consumes selfNonEmptyIterator::take(usize) -> NonEmptyIterator::take(NonZeroUsize) and doesn't panic anymoreNEVec::truncate(usize) -> NEVec::truncate(NonZeroUsize) and doesn't panic anymoreNonZeroUsize instead of usize:
with_capacity(NonZeroUsize)with_capacity_and_hasher(NonZeroUsize)capacity() -> NonZeroUsizeNEVec, NEMap, NESet, and NESliceNESlice::new(&T, &[T])IntoIteratorProxyconst:
NEVec::new()NEVec::first()from_vec to try_from_vecfrom_map to try_from_mapfrom_slice to try_from_slicefrom_set to try_from_set.IteratorExt is removed in favor of IntoIteratorExt. Now it'stry_into_nonempty_iter() instead of to_nonempty_iter() onIntoIterator..iter(), .iter_mut(), etc, are now prefixed with nonempty_FromNonEmptyIterator<T> is now implemented for HashSet<T, S> instead ofHashSet<T> (with the default hasher).PartialEq for NEIndexMap, previously, maps with unequal lengthsNEMap::with_capacity() and NESet::with_capacity(), it wasn'tSstd), in case the user wants to specify the hasherwith_capacity_and_hasher() can be used. The fix moved the method into theimpl block.either: adds NEEither an extension to either::Either.itertools: adds a new NonEmptyItertools trait that is anNonEmptyIterator similar to how Itertools extendsIterator. So far, cartesian_product(), sorted_by_key(), andall_unique() are implemented.NonEmptyIterator::find() the equivalent of Iterator::find().IntoNonEmptyIterator for &NEVec, &NEIndexMap, &NEMap, &NESet,&NESlice, &[T; $i] where $i > 0 (these previously only existed for theirNESlice::from_slice() is now constIndex<usize> for NESliceDebugne_vec for nev, ne_hashset for nes, and ne_hashmap for nem.justfile that allows to runjust lint or just test.Vec versus NEVec..iter() methods to all collections returning a regular Iterator.NVec::sort_by and NEVec::sort_by_key .
NonEmptyIterator::group_by.NVec::sort_by and NEVec::sort_by_key.Extend for NEVec.NEVec::sort avoids a second internal sort.Missing FromNonEmptyIterator for HashMap.
FromNonEmptyIterator for HashMap.serde support for NEMap and NESet.
serde support for NEMap and NESet.Ownership issues in nem! when using non-Copy types.
nem! when using non-Copy types.Implementation of NonEmptyIterator for fixed-sized stdlib Arrays.
NonEmptyIterator for fixed-sized stdlib Arrays.Added NEVec::partition_point to match the function of the same name in std.
NEVec::partition_point to match the function of the same name in std.docs.rs.More edge cases involving NEChunks.
NEChunks.IntoIterator for NEChunks yielding the wrong type.
IntoIterator for NEChunks yielding the wrong type.NonEmptyIterator for NEChunks missing a cutoff condition.The missing IntoIterator impl for NEChunks.
IntoIterator impl for NEChunks.IntoIteratorExt for direct conversion from anything that implements
IntoIterator. Thanks to Rinde van Lon.NEMap and NEIndexedMap. Thanks to Rinde van Lon.NEIndexMap, thanks to Rinde van Lon.
NEIndexMap, thanks to Rinde van Lon.NonEmptyIterator::max_by_key and NonEmptyIterator::min_by_key, also thanks to Rinde.NEVec::with_capacityNEVec::nonempty_chunks and NESlice::nonempty_chunkslen implementations and NonEmptyIterator::count have had
their return type changed to NonZeroUsize.NonEmptyIterator::reduce, which yields a concrete Self::Item instead of an Option.
NonEmptyIterator::reduce, which yields a concrete Self::Item instead of an
Option.IteratorExt::to_nonempty_iter for converting any given Iterator into a
non-empty one (if possible).NEVec::dedup* series for removing duplicate items in-place.head value when converting into an
NESet from other nonempty iterators.FromNonEmptyIterator impls for NEMap and NESet.
FromNonEmptyIterator impls for NEMap and NESet.Debug, Clone, PartialEq, and Eq for NEMap.NESlice for when what you have on hand is already borrowed. Thanks again to Greg Shuflin.
NESlice for when what you have on hand is already borrowed. Thanks again to
Greg Shuflin.A FromNonEmptyIterator instance for Result, meaning you can collect into a guaranteed Result , Error> (or other nonempty type). Thanks to Greg Shuflin
FromNonEmptyIterator instance for Result, meaning you can collect into
a guaranteed Result<NEVec<...>, Error> (or other nonempty type). Thanks to
Greg Shuflin.Missing IntoNonEmptyIterator instances.
IntoNonEmptyIterator instances.Intoiterator instance for FlatMap.IntoIterator for Take.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →