]> git.lizzy.rs Git - enumset.git/blob - RELEASES.md
Implement core::iter::Sum for EnumSet<T>
[enumset.git] / RELEASES.md
1 # Version 1.0.4 (2021-02-07)
2 * Fixes a bug that caused `enumset_derive` to require an import of `EnumSet`
3   in the scope to function.
4
5 # Version 1.0.3 (2021-01-27)
6 * (This version contains no code changes.)
7 * Redirected badges in the README to point at travis-ci.com instead of .org
8 * Added `README.md`, and the license files to the crate distribution.
9
10 # Version 1.0.2 (2021-01-25)
11 * Fixed critical error compiling on newer versions of `syn` caused by a
12   mistaken import from a private module.
13
14 # Version 1.0.1 (2020-08-09)
15 * Implemented `ExactSizeIterator` for `EnumSetIter`.
16
17 # Version 1.0.0 (2020-04-06)
18
19 ## Breaking Changes
20 * **[WARNING: Potential silent breaking change]** Changed `EnumSet::insert` to
21   return whether a value was newly  inserted, rather than whether the value
22   already existed in the set. This corresponds better with the behavior of
23   `HashSet::insert` and `BTreeSet::insert`.
24 * Renamed `to_bits`/`from_bits` to `as_u128`/`from_u128`.
25 * `EnumSet::bit_width` and `EnumSet::variant_count` now return a `u32` instead
26   of a `u8` for future-proofing.
27 * Removed `nightly` feature flag, as it is no longer required.
28
29 ## New features
30 * Added a series of functions like `as_u128`/`from_u128` for other unsigned
31   numeric types. (e.g. `as_u8`/`from_u8`, `as_u16`/`from_u16`, etc)
32 * Added variants of `as_u128`/`from_u128` that return an `Option` instead of
33   panicking when the conversion cannot be done.
34 * Added variants of `as_u128`/`from_u128` that truncate unknown bits instead
35   of panicking.
36 * Implemented `Extend<EnumSet<T>>` and `FromIterator<EnumSet<T>>` for
37   `EnumSet<T>`.
38 * Added an `#[enumset(crate_name = "renamed_enumset")]` annotation for
39   handling renamed crates.
40
41 ## Bugfixes
42 * Fixed a bug where the procedural macro would fail on enums with a repr
43   annotation set. While reprs larger than u8 are supported, negative enum
44   variants or enum variants above 127 are still not currently supported.
45
46 # Version 0.4.5 (2020-02-19)
47 * Fixed a bug where compilation failed when the `serde` flag was enabled, and
48   another trait that defined `serialize` or `deserialize` was in scope.
49
50 # Version 0.4.4 (2019-10-12)
51 * Fixed a bug where `#[enumset(serialize_as_list)]` did not work when `Result`
52   is shadowed.
53
54 # Version 0.4.3 (2019-10-08)
55 * Implemented `Extend` and `FromIterator` for `EnumSet<T>`.
56
57 # Version 0.4.2 (2019-09-28)
58 * Fixed a bug preventing empty enums and enums with one value from compiling.
59
60 # Version 0.4.1 (2019-09-27)
61 * Fixed bug in `EnumSetIter::size_hint`.
62
63 # Version 0.4.0 (2019-05-06)
64 * Removed outdated macros and attributes.
65 * All attributes for the custom derive are now written as `#[enumset(...)]`
66 * Implemented `#[enumset(serialize_deny_unknown)]`
67 * Implemented `#[enumset(serialize_repr="...")]`
68 * `#[derive(EnumSetType)]` now only implements `Copy`, `Clone`, `PartialEq` and
69   `Eq` automatically.
70
71 # Version 0.3.19 (2019-05-02)
72 * Fix a bug when deserializing enums containing invalid bits set.
73
74 # Version 0.3.18 (2019-03-11)
75 * Fix an off-by-one error causing enums with 9, 17, 33, etc variants to behave
76   unexpectedly.
77
78 # Version 0.3.17 (2019-03-11)
79 * Add an `#[enumset_serialize_as_list]` attribute to cause the `Deserialize`
80   and `Serialize` implementations for `EnumSet<T>` to serialize it as a seq
81   of `T`s rather than an integer bitmask.
82
83 # Version 0.3.16 (2019-02-04)
84 * Added `Default` implementation for `EnumSet<T>` that returns an empty map.
85
86 # Version 0.3.15 (2019-01-08)
87 * Added optional `serde` support.
88
89 # Version 0.3.14 (2018-11-09)
90
91 * Deprecated the `enum_set_type!` macro in favor of a custom derive.
92 * Added a way to avoid the automatic operator overloads derived from
93   EnumSetTypes.
94 * Fixed a major issue that would have prevented `enumset` from being used in
95   `#[no_std]` crates.
96 * Minimum required version is now 1.30.0+. There should be no more need to
97   bump the minimum Rust version in the forseeable future.
98
99 # Prior versions
100
101 No release notes were kept for prior versions.