Skip to content

Commit 5cc7ef7

Browse files
committed
Implement Eq and Hash for BitFlags
Closes #24. Also ran through the Rust API Interoperability guidelines and noticed I don't implement Hash. This is now fixed.
1 parent facaa7a commit 5cc7ef7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enumflags/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ use _internal::RawBitFlags;
167167

168168
/// Represents a set of flags of some type `T`.
169169
/// The type must have the `#[derive(BitFlags)]` attribute applied.
170-
#[derive(Copy, Clone)]
170+
#[derive(Copy, Clone, Eq, Hash)]
171171
#[repr(transparent)]
172172
pub struct BitFlags<T: RawBitFlags> {
173173
val: T::Type,

0 commit comments

Comments
 (0)