Skip to content

Commit 5094950

Browse files
committed
Explicitly derive Eq and PartalEq for bitflags types
Apparently the new version of bitflags does not explicitly derive Eq and PartialEq. This change should have gone in with PR #865. Signed-off-by: mulhern <[email protected]>
1 parent 8af2635 commit 5094950

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/dm_flags.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::core::dm_ioctl as dmi;
66

77
bitflags! {
88
/// Flags used by devicemapper.
9-
#[derive(Clone, Copy, Debug, Default)]
9+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
1010
pub struct DmFlags: dmi::__u32 {
1111
/// In: Device should be read-only.
1212
/// Out: Device is read-only.
@@ -52,7 +52,7 @@ bitflags! {
5252
/// Flags used by devicemapper, see:
5353
/// https://sourceware.org/git/?p=lvm2.git;a=blob;f=libdm/libdevmapper.h#l3627
5454
/// for complete information about the meaning of the flags.
55-
#[derive(Clone, Copy, Debug, Default)]
55+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
5656
pub struct DmUdevFlags: u32 {
5757
/// Disables basic device-mapper udev rules that create symlinks in /dev/<DM_DIR>
5858
/// directory.

0 commit comments

Comments
 (0)