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