5.8 KiB
Version 2.7.3
Other changes
Version 2.7.2
Other changes
- Reduced RAM usage and improved compilation times when using
derive(Enum)for large enums withoverflow-checksenabled.
Version 2.7.1
Other changes
- Updated author name.
Version 2.7.0
New features
- Implemented
EnumMap::from_fn.
Version 2.6.3
Other changes
-
Updated the repository URL as the project was migrated from GitHub to Codeberg.
-
This project is now compliant with the REUSE Specification.
Version 2.6.2
Other changes
- Hide
out_of_boundsreexport from documentation.
Version 2.6.1
Other changes
- Provide better panic message when providing out-of-bounds index to `Enum::from_usize``.
Version 2.6.0
New features
EnumMap::as_arrayis now usable in const contexts.
Other changes
-
This crate now follows "N minus two" MSRV policy. This means that it supports the current Rust release, as well as the two before that.
-
Upgraded syn to 2.0.0.
Version 2.5.0
New features
-
Implemented
EnumMap::as_arrayandEnumMap::as_mut_array(implemented by @Fuuzetsu). -
Implemented
PartialOrdandOrdforEnumMap(implemented by @nicarran).
Version 2.4.2
Other changes
- Added license files to crate tarball.
- Added changelog to crate tarball.
Version 2.4.1
Other changes
- Improved performance of code generated for
from_usizewhen derivingEnum.
Version 2.4.0
New features
-
Implemented
Enumfor()(unit type) andcore::cmp::Ordering(implemented by @phimuemue). -
Implemented
EnumMap::into_array.
Version 2.3.0
New features
EnumMap::lenis now usable in const contexts.
Other changes
Enumderive now can deal with re-definitions ofusizeandunimplemented.
Version 2.2.0
New features
EnumMap::from_arrayis now usable in const contexts.
Version 2.1.0
New features
-
Implemented
DoubleEndedIteratorforIntoIter. -
Implemented
EnumMap::into_values.
Other changes
- Changed behavior of
IntoIterso that it drops rest of the elements when one destructor panics.
Version 2.0.3
Other changes
- Optimized performance of
enum_map!macro.
Version 2.0.2
Other changes
- Fixed safety problem when using
enum_map!macro with enums that incorrectly implementedEnumtrait.
Version 2.0.1
Other changes
- Adjusted crate metadata to avoid lib.rs warnings.
Version 2.0.0
New features
-
Implemented
FromIteratorforEnumMap(implemented by @bit_network on GitLab). -
Implemented
EnumMap::map. -
Derives support product types in addition to sum types (implemented by @bzim on GitLab).
-
It's now possible to access enum length by accessing
LENGTHinEnumtrait.
Breaking changes
Enumtrait was split into two traits,EnumandEnumArray.
Version 1.1.1
Other changes
- Worked around a bug in Clippy that caused false positives when using
use_selflint for code that derivedEnumtrait.
Version 1.1.0
New features
- Implemented
Arbitraryfor maps where the value type also implementsArbitrary. (You have to enable the "arbitrary" feature.)
Version 1.0.0
New features
-
It's now possible to use
returnand?withinmacro_rules!macro. -
Enumtrait is much simpler having two methods only.
Other changes
-
Removed previously deprecated features.
-
Renamed
to_usizetointo_usizematching the naming convention used in Rust programming language.
Version 0.6.5
Other changes
- Deprecated
EnumMap::is_emptyandEnumMap::new.EnumMap::newusages can be replaced withEnumMap::default.
Version 0.6.4
Other changes
- Deprecated
EnumMap::as_ptrandEnumMap::as_mut_ptr.
Version 0.6.3
New features
IterandValuesnow implementsClone(added by @amanieu).
Version 0.6.2.
New features
- Added
EnumMap#clearmethod (added by @Riey, thanks :)).
Version 0.6.0
Incompatible changes
- Now requires Rust 1.36.
Version 0.5.0
- Fixed the issue where an aliasing
Fromtrait implementation caused compilation errors withenum_map!macro.
Incompatible changes
- Now requires Rust 1.31.
Version 0.4.1
New features
- Default
serdefeatures are disabled. This allows enabling serde feature when compiling withoutstd.
Version 0.4.0
Change of #[derive(EnumMap)] to #[derive(Enum)] was supposed to appear in 0.3.0,
but it was forgotten about. This release fixes just that.
Incompatible changes
- Changed
#[derive(EnumMap)]to#[derive(Enum)]to match trait name.
Version 0.3.1
- Updated README use
#[derive(EnumMap)]instead of#[derive(Enum)].
Version 0.3.0
New features
-
Implemented compact serde serialization for binary formats like bincode.
-
Iterator traits with exception now implement
FusedIterator.
Incompatible changes
-
Increased required Rust version to 1.26.0.
-
Renamed
Internaltrait toEnum. -
Added new associated constant
POSSIBLE_VALUEStoEnumtrait, representing the number of possible values the type can have. Manual implementations are required to provide it. -
Removed
Enumimplementation forOption<T>. -
Implemented compact serialization, for formats like
bincode. This makes it impossible to deserialize non-compact representation used by enum-map 0.2.0. -
valuesmethod returnsValues<V>as opposed toslice::Iter<V>.