- Minimum required Rust version is now 1.64+, due to updates in dependencies.
- Implemented
core::iter::Sum
forBigEnumSet<T>
. - Added
README.md
, and the license files to the crate distribution.
- Import
Span
fromproc_macro2
instead ofsyn
. This fixes a breakage withsyn
v1.0.58 - Implemented
ExactSizeIterator
forEnumSetIter
- [WARNING: Potential silent breaking change] Changed
BigEnumSet::insert
to return whether a value was newly inserted, rather than whether the value already existed in the set. This corresponds better with the behavior ofHashSet::insert
andBTreeSet::insert
. This change matches a similar change inEnumSet
inenumset
crate version 1.0. - Updated the signatures of many methods in
BigEnumSet
to take arguments by value or reference. Pass the value by reference to avoid copies, if the enum set is large. Also, operator implementations forBigEnumSet
take arguments by value or reference. - Removed
Copy
,PartialOrd
,Ord
,PartialEq
,Eq
andHash
implementations ofEnumSetIter
. They are typically not useful for iterators and might result in undetected bugs in client code. This change matches a similar change inEnumSet
inenumset
crate version 1.0. - Renamed
BigEnumSet::to_bits
toBigEnumSet::as_bits
. - Replaced
BigEnumSet::from_bits
withBigEnumSet::try_from_bits
, which returnsOption<BigEnumSet>
. - Removed
nightly
feature flag, as it is no longer required.
- Added
BigEnumSet::from_bits_truncated
that truncate unknown bits.
- More exhaustive checking to ensure that any unused trailing bytes at
the end of a serialized enum are zero, when
#[big_enum_set(serialize_deny_unknown)]
is set. - Proc macro now supports
#[repr(XXX)]
annontations. The variant discriminants should still be non-negative and fit in au16
.
- Fixed a compilation breakage with 0.1.6
- Fixed a bug where compilation failed when the
serde
flag was enabled, and another trait that definedserialize
ordeserialize
was in scope. - Minor code cleanups.
- Added documentation for derive macro.
- Fixed a bug where
#[enumset(serialize_as_list)]
did not work whenResult
is shadowed. - Manually implement
Hash
,PartialOrd
, andOrd
instead of deriving them. This allowsBigEnumSet
to have those traits implemented even when the enum itself does not.
- Implemented
Extend
andFromIterator
forBigEnumSet<T>
.
- Updated dependencies to newer versions.
- Removed
big_enum_set::internal::core_export
and directly use::core
in macros. - Enable CI using TravisCI.
- Fixed a bug so that empty enums and enums with one enum compiles.
- Initial version based on a fork of Lymia/enumset.