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