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-checks
enabled.
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_bounds
reexport 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_array
is 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_array
andEnumMap::as_mut_array
(implemented by @Fuuzetsu). -
Implemented
PartialOrd
andOrd
forEnumMap
(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_usize
when derivingEnum
.
Version 2.4.0
New features
-
Implemented
Enum
for()
(unit type) andcore::cmp::Ordering
(implemented by @phimuemue). -
Implemented
EnumMap::into_array
.
Version 2.3.0
New features
EnumMap::len
is now usable in const contexts.
Other changes
Enum
derive now can deal with re-definitions ofusize
andunimplemented
.
Version 2.2.0
New features
EnumMap::from_array
is now usable in const contexts.
Version 2.1.0
New features
-
Implemented
DoubleEndedIterator
forIntoIter
. -
Implemented
EnumMap::into_values
.
Other changes
- Changed behavior of
IntoIter
so 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 implementedEnum
trait.
Version 2.0.1
Other changes
- Adjusted crate metadata to avoid lib.rs warnings.
Version 2.0.0
New features
-
Implemented
FromIterator
forEnumMap
(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
LENGTH
inEnum
trait.
Breaking changes
Enum
trait was split into two traits,Enum
andEnumArray
.
Version 1.1.1
Other changes
- Worked around a bug in Clippy that caused false positives when using
use_self
lint for code that derivedEnum
trait.
Version 1.1.0
New features
- Implemented
Arbitrary
for 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
return
and?
withinmacro_rules!
macro. -
Enum
trait is much simpler having two methods only.
Other changes
-
Removed previously deprecated features.
-
Renamed
to_usize
tointo_usize
matching the naming convention used in Rust programming language.
Version 0.6.5
Other changes
- Deprecated
EnumMap::is_empty
andEnumMap::new
.EnumMap::new
usages can be replaced withEnumMap::default
.
Version 0.6.4
Other changes
- Deprecated
EnumMap::as_ptr
andEnumMap::as_mut_ptr
.
Version 0.6.3
New features
Iter
andValues
now implementsClone
(added by @amanieu).
Version 0.6.2.
New features
- Added
EnumMap#clear
method (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
From
trait implementation caused compilation errors withenum_map!
macro.
Incompatible changes
- Now requires Rust 1.31.
Version 0.4.1
New features
- Default
serde
features 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
Internal
trait toEnum
. -
Added new associated constant
POSSIBLE_VALUES
toEnum
trait, representing the number of possible values the type can have. Manual implementations are required to provide it. -
Removed
Enum
implementation 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. -
values
method returnsValues<V>
as opposed toslice::Iter<V>
.