]> git.lizzy.rs Git - enumset.git/blob - RELEASES.md
Add serialize_as_map
[enumset.git] / RELEASES.md
1 # Version 1.0.12 (2022-10-02)
2 * Updated darling version to reduce compile times when combined with other
3   crates. (Thanks @AlexTMjugador)
4
5 # Version 1.0.11 (2022-04-12)
6 * Added support for explicitly specifying the internal representation of
7   `EnumSet<T>` using the `#[enumset(repr = "...")]` annotation.
8   (Thanks @ahcodedthat)
9 * Added new functions for directly converting an EnumSet to and from its
10   internal representation, when it is explicitly specified.
11   (Thanks @ahcodedthat)
12 * Added new `from_*_unchecked` functions that unsafely convert a value into
13   an `EnumSet<T>` without checking if only valid bits are set.
14
15 # Version 1.0.10 (2022-04-05)
16 * The `proc-macro-crate` support has been locked behind the `std` flag and
17   version `1.0.9` has been yanked due to a regression that causes enumset to
18   fail to compile on `#[no_std]` platforms in programs that also use `serde`.
19 * Introduced new `std` and `alloc` feature flags. These have no current use
20   beyond the previous change, but will be used in the future.
21
22 # Version 1.0.9 (2022-04-04) [YANKED]
23 * Disable unused default features for the `darling` crate. (Thanks @glandium)
24 * Add a new `#[enumset(no_super_impls)]` feature which prevents
25   `#[derive(EnumSetType)]` from automatically generating implementations of
26   `Copy`, `Clone`, `Eq`, or `PartialEq`. (Thanks @ahcodedthat)
27 * Suppressed several clippy warnings.
28 * Implemented `DoubleEndedIterator` for `EnumSetIter`.
29 * `#[derive(EnumSetType)]` now uses `proc-macro-crate` to find the path of the
30   `enumset` crate instead of relying on the user to manually specify it, 
31   making it easier to use when the crate has been renamed via cargo.
32 * Minimum required Rust version is now 1.36+, due to updates in dependencies.
33
34 # Version 1.0.8 (2021-11-04)
35 * Optimized `EnumSet` iteration. (Thanks @MinusKelvin)
36
37 # Version 1.0.7 (2021-07-05)
38 * Added the `#[repr(transparent)]` flag to `EnumSet<T>` to allow for safe usage
39   in FFI code. Note that invalid bits being set in the bitset causes UB, so
40   this should be done with care. (Thanks @Riey)
41
42 # Version 1.0.6 (2021-02-27)
43 * Fix an unneeded warning in the output for `enum_set!` for a single value.
44
45 # Version 1.0.5 (2021-02-24)
46 * Implemented `core::iter::Sum` for `EnumSet<T>`.
47 * Properly acknowledge that the minimum required Rust version is actually 1.34+
48   and not 1.31+. An retroactive changelog entry has been added to 1.0.0.
49
50 # Version 1.0.4 (2021-02-07)
51 * Fixes a bug that caused `enumset_derive` to require an import of `EnumSet`
52   in the scope to function.
53
54 # Version 1.0.3 (2021-01-27)
55 * (This version contains no code changes.)
56 * Redirected badges in the README to point at travis-ci.com instead of .org
57 * Added `README.md`, and the license files to the crate distribution.
58
59 # Version 1.0.2 (2021-01-25)
60 * Fixed critical error compiling on newer versions of `syn` caused by a
61   mistaken import from a private module. (Thanks @ocboogie)
62
63 # Version 1.0.1 (2020-08-09)
64 * Implemented `ExactSizeIterator` for `EnumSetIter`. (Thanks @dmarcuse)
65
66 # Version 1.0.0 (2020-04-06)
67
68 ## Breaking Changes
69 * **[WARNING: Potential silent breaking change]** Changed `EnumSet::insert` to
70   return whether a value was newly  inserted, rather than whether the value
71   already existed in the set. This corresponds better with the behavior of
72   `HashSet::insert` and `BTreeSet::insert`.
73 * Renamed `to_bits`/`from_bits` to `as_u128`/`from_u128`.
74 * `EnumSet::bit_width` and `EnumSet::variant_count` now return a `u32` instead
75   of a `u8` for future-proofing.
76 * Removed `nightly` feature flag, as it is no longer required.
77 * Minimum required Rust version is now 1.34+.
78
79 ## New features
80 * Added a series of functions like `as_u128`/`from_u128` for other unsigned
81   numeric types. (e.g. `as_u8`/`from_u8`, `as_u16`/`from_u16`, etc)
82 * Added variants of `as_u128`/`from_u128` that return an `Option` instead of
83   panicking when the conversion cannot be done.
84 * Added variants of `as_u128`/`from_u128` that truncate unknown bits instead
85   of panicking.
86 * Implemented `Extend<EnumSet<T>>` and `FromIterator<EnumSet<T>>` for
87   `EnumSet<T>`. (Thanks @manuthambi)
88 * Added an `#[enumset(crate_name = "renamed_enumset")]` annotation for
89   handling renamed crates.
90
91 ## Bugfixes
92 * Fixed a bug where the procedural macro would fail on enums with a repr
93   annotation set. While reprs larger than u8 are supported, negative enum
94   variants or enum variants above 127 are still not currently supported.
95
96 # Version 0.4.5 (2020-02-19)
97 * Fixed a bug where compilation failed when the `serde` flag was enabled, and
98   another trait that defined `serialize` or `deserialize` was in scope.
99
100 # Version 0.4.4 (2019-10-12)
101 * Fixed a bug where `#[enumset(serialize_as_list)]` did not work when `Result`
102   is shadowed.
103
104 # Version 0.4.3 (2019-10-08)
105 * Implemented `Extend` and `FromIterator` for `EnumSet<T>`.
106
107 # Version 0.4.2 (2019-09-28)
108 * Fixed a bug preventing empty enums and enums with one value from compiling.
109
110 # Version 0.4.1 (2019-09-27)
111 * Fixed bug in `EnumSetIter::size_hint`. (Thanks @manuthambi)
112
113 # Version 0.4.0 (2019-05-06)
114 * Removed outdated macros and attributes.
115 * All attributes for the custom derive are now written as `#[enumset(...)]`
116 * Implemented `#[enumset(serialize_deny_unknown)]`
117 * Implemented `#[enumset(serialize_repr="...")]`
118 * `#[derive(EnumSetType)]` now only implements `Copy`, `Clone`, `PartialEq` and
119   `Eq` automatically.
120
121 # Version 0.3.19 (2019-05-02)
122 * Fix a bug when deserializing enums containing invalid bits set.
123
124 # Version 0.3.18 (2019-03-11)
125 * Fix an off-by-one error causing enums with 9, 17, 33, etc variants to behave
126   unexpectedly.
127
128 # Version 0.3.17 (2019-03-11)
129 * Add an `#[enumset_serialize_as_list]` attribute to cause the `Deserialize`
130   and `Serialize` implementations for `EnumSet<T>` to serialize it as a seq
131   of `T`s rather than an integer bitmask.
132
133 # Version 0.3.16 (2019-02-04)
134 * Added `Default` implementation for `EnumSet<T>` that returns an empty map.
135   (Thanks @boxdot)
136
137 # Version 0.3.15 (2019-01-08)
138 * Added optional `serde` support.
139
140 # Version 0.3.14 (2018-11-09)
141
142 * Deprecated the `enum_set_type!` macro in favor of a custom derive.
143 * Added a way to avoid the automatic operator overloads derived from
144   EnumSetTypes.
145 * Fixed a major issue that would have prevented `enumset` from being used in
146   `#[no_std]` crates.
147 * Minimum required version is now 1.30.0+. There should be no more need to
148   bump the minimum Rust version in the forseeable future.
149
150 # Prior versions
151
152 No release notes were kept for prior versions.