1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
<!--
SPDX-FileCopyrightText: 2018 - 2023 Kamila Borowska <kamila@borowska.pw>
SPDX-FileCopyrightText: 2021 Alex Sayers <alex@asayers.com>
SPDX-License-Identifier: MIT OR Apache-2.0
-->
# Version 2.7.3
## Other changes
- Fixed [a regression introduced in 2.7.2 that caused `#[derive(Enum)]` to
generate incorrect code when dealing with enums containing
fields](https://codeberg.org/xfix/enum-map/issues/112).
# Version 2.7.2
## Other changes
- Reduced RAM usage and improved compilation times when using `derive(Enum)`
for large enums with `overflow-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` and `EnumMap::as_mut_array`
(implemented by [@Fuuzetsu](https://github.com/Fuuzetsu)).
- Implemented `PartialOrd` and `Ord` for `EnumMap` (implemented by
[@nicarran](https://github.com/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
deriving `Enum`.
# Version 2.4.0
## New features
- Implemented `Enum` for `()` (unit type) and `core::cmp::Ordering`
(implemented by [@phimuemue](https://github.com/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 of `usize` and
`unimplemented`.
# Version 2.2.0
## New features
- `EnumMap::from_array` is now usable in const contexts.
# Version 2.1.0
## New features
- Implemented `DoubleEndedIterator` for `IntoIter`.
- 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 implemented `Enum` trait.
# Version 2.0.1
## Other changes
- Adjusted crate metadata to avoid lib.rs warnings.
# Version 2.0.0
## New features
- Implemented `FromIterator` for `EnumMap` (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` in
`Enum` trait.
## Breaking changes
- `Enum` trait was split into two traits, `Enum` and `EnumArray`.
# Version 1.1.1
## Other changes
- Worked around a bug in Clippy that caused false positives when using
`use_self` lint for code that derived `Enum` trait.
# Version 1.1.0
## New features
- Implemented `Arbitrary` for maps where the value type also implements
`Arbitrary`. (You have to enable the "arbitrary" feature.)
# Version 1.0.0
## New features
- It's now possible to use `return` and `?` within `macro_rules!` macro.
- `Enum` trait is much simpler having two methods only.
## Other changes
- Removed previously deprecated features.
- Renamed `to_usize` to `into_usize` matching the naming convention
used in Rust programming language.
# Version 0.6.5
## Other changes
- Deprecated `EnumMap::is_empty` and `EnumMap::new`. `EnumMap::new` usages
can be replaced with `EnumMap::default`.
# Version 0.6.4
## Other changes
- Deprecated `EnumMap::as_ptr` and `EnumMap::as_mut_ptr`.
# Version 0.6.3
## New features
- `Iter` and `Values` now implements `Clone` (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 with `enum_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 without `std`.
# 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 to `Enum`.
- Added new associated constant `POSSIBLE_VALUES` to `Enum` trait,
representing the number of possible values the type can have. Manual
implementations are required to provide it.
- Removed `Enum` implementation for `Option<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 returns `Values<V>` as opposed to `slice::Iter<V>`.
|