Skip to content

Commit

Permalink
Explicitly derive Eq and PartalEq for bitflags types
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mulkieran committed Oct 23, 2023
1 parent 8af2635 commit 5094950
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/dm_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::core::dm_ioctl as dmi;

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

0 comments on commit 5094950

Please sign in to comment.