You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release Notes
Added
Added MaxSize trait to expose static maximum capacity from collection types.
Added RemainingSize trait (with remaining_size method) to expose dynamic remaining capacity from collection types.
Added RemainingSize and MaxSize implementations for ArrayVec and Array.
Added Debug implementations for CollectionErrorData, ResultCollectionErrorData, and UnzipErrorData.
TryFromIterator implementations for hash-based collections (HashMap, HashSet, IndexMap, IndexSet, and hashbrown variants) now support custom hashers via the S: BuildHasher + Default bound.
Changed
Breaking: Renamed Capacity trait to RemainingSize and its capacity_hint method to remaining_size.
Migration: Update all references from Capacity to RemainingSize and from capacity_hint() to remaining_size().
Breaking: Changed ArrayVec::try_extend_one to return crate::errors::CapacityError instead of arrayvec::CapacityError.
Migration: Update error handling to expect crate::errors::CapacityError.
Breaking: Changed all hash and set implementations that can take a S (hasher) to require S: BuildHasher + Default instead of using the default hasher (RandomState). This breaks some type-inference.
Migration: Specify the hasher type explicitly, e.g. HashMap<K, V, RandomState> or use TryCollectEx.
Breaking: Changed TryFromIterator for [T; N] to return CollectionError<I::IntoIter, PartialArray<T, N>, CapacityError<T>> instead of Vec<T>.