Repository navigation
Added
-
Added helper constructors for
CapacityError:ensure_fitsensure_fits_inensure_fits_intocollect_overflowedcollect_underflowedextend_overflowed
-
Added helper constructors for
CollectError:ensure_fits_inensure_fits_intocollect_overflowedcollect_underflowedextend_overflowed
-
Added
ExtendErrortype forTryExtendoperations. UnlikeCollectError, it has nocollected
field becauseTryExtendadds items directly to the target collection (basic error guarantee). -
Added
ExtendError::ensure_fits_intohelper for bounds checking in extend operations. -
Added
RemainingCapandFixedCapimplementations forVec. -
Implemented
TryFrom<PartialArray<T, N>>for[T; N]to allow converting a fullPartialArray(e.g. from an overflow error) into an array.
Changed
- Breaking:
TupleExtendErroris no longer generic over theLeftandRighterror types.TryExtend::Errorfor tuples is nowEither<TupleExtendError<...>, TupleExtendError<...>>.- Migration: Remove explicit error type parameters if you were specifying them.
- Breaking:
UnzipErroris no longer an enum with side-specific variants. It is now a structUnzipError<Failed, Partial, I>.TryUnzipnow returnsEither<UnzipError<FromA, FromB, Self>, UnzipError<FromB, FromA, Self>>.- Migration: Match on
Eitherto determine which side failed, then access fields directly on theUnzipErrorstruct.
- Migration: Match on
- Breaking: Renamed
UnzipError::successfultoUnzipError::partialto better reflect its purpose as a partial collection from the non-failing side.- Migration: Rename usages of
err.successfultoerr.partial.
- Migration: Rename usages of
- Breaking: Renamed
unevaluatedfield topendinginUnzipErrorandTupleExtendError.- Migration: Rename
err.unevaluatedtoerr.pending. - Note:
TupleExtendErrorgeneric parameterU(Unevaluated) is nowP(Pending).
- Migration: Rename
- Breaking: Renamed
CollectionErrortoCollectError.- Migration: Update all references from
CollectionErrortoCollectError.
- Migration: Update all references from
- Breaking: Renamed
CollectError::iteratorfield toCollectError::remain.- Migration: Update all references from
CollectError::iteratortoCollectError::remain.
- Migration: Update all references from
- Breaking: Changed
ArrayVecTryFromIteratorandTryExtendimplementations to returnArrayVecinstead ofVecinCollectError.- Migration: Update error handling to expect
ArrayVecin thecollectedfield.
- Migration: Update error handling to expect
- Breaking: Changed
CollectError::overflowedtoextend_overflowed.- Migration: Update error handling to use
extend_overflowedctor.
- Migration: Update error handling to use
- Breaking:
TryExtendimplementations now returnExtendErrorinstead ofCollectError.ExtendErrorhas nocollectedfield (items go directly into the target collection).- Migration: Update error handling to use
ExtendErrorinstead ofCollectError.
Theerrorandremainfields are still available.
- Breaking: Moved capacity related types (
CapacityError,CapacityErrorKind,FixedCap,RemainingCap) fromerrorstoerrors::capacity.- Migration: Update imports to
collect_failable::errors::capacity::*.
- Migration: Update imports to
- Breaking: Renamed
RemainingSizetrait toRemainingCapandMaxSizetrait toFixedCap.- Migration: Update all references from
RemainingSizetoRemainingCapandMaxSizetoFixedCap.
- Migration: Update all references from
- Breaking: Moved collision related types (
Collision) fromerrorstoerrors::collision.- Migration: Update imports to
collect_failable::errors::collision::*.
- Migration: Update imports to
- Breaking: Renamed
TupleExtensionErrortoTupleExtendError.- Migration: Update all references from
TupleExtensionErrortoTupleExtendError.
- Migration: Update all references from
- Refactored
ExtendError,CollectError,ResultCollectError,UnzipError, andTupleExtendErrorto use conditional function definitions fornewandinto_datainstead of inlinecfgblocks. - Removed
allocdependency fromunsafe,tuple, andarrayvecfeatures. These features now work inno_stdenvironments without an allocator (error types will store data inline). - Breaking: Renamed
tuplefeature totuples.- Migration: Update
Cargo.tomlto usetuplesinstead oftuplein dependencies or feature lists.
- Migration: Update
Fixed
- Added missing
allocfeature dependency to several features (unsafe,tuple,hashbrown,indexmap,arrayvec) whose error types require allocation. - Fixed incorrect
CapacityErrorcapacity reported when collecting into a fixed-size array overflows (viaPartialArray). It now correctly reports the array's capacity instead ofSizeHint::ZERO.
Removed
- Breaking: Removed export of
PartialArraytype in theerrorsmodule. It is now only available undererrors::partial_array::PartialArray.- Migration: Update all references from
PartialArraytoerrors::partial_array::PartialArray.
- Migration: Update all references from
- Breaking: Moved
SizeHintexport from crate root toerrorsmodule.- Migration: Update all references from
collect_failable::SizeHinttocollect_failable::errors::SizeHint.
- Migration: Update all references from
- Breaking: Moved
Eitherexport from crate root toerrorsmodule.- Migration: Update all references from
collect_failable::either::Eithertocollect_failable::errors::either::Either.
- Migration: Update all references from
- Breaking:
TryExtendSafeno longer extendsTryExtend. It now has its ownErrorassociated type.- This reflects the semantic difference:
TryExtend::Errormay have an emptycollectedfield
(items were added to target), whileTryExtendSafe::Errorincludes rolled-back items. - Migration: Update any manual
TryExtendSafeimplementations to addtype Error = ....
- This reflects the semantic difference:
- Breaking: Removed
TupleExtendErrornew. This type is not intended for user construction.- Migration: Do not internally construct
TupleExtendError.
- Migration: Do not internally construct