Skip to content

Commit d47f605

Browse files
authored
Merge pull request #888 from mulkieran/add-derives-for-bitflag
Explicitly derive Eq and PartalEq for bitflags types
2 parents 8af2635 + 5094950 commit d47f605

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)