Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gate PartialEq and Eq on freebsd objects behind extra_traits #2659

Merged
merged 2 commits into from
Jan 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Gate PartialEq and Eq on freebsd objects behind extra_traits
  • Loading branch information
tmandry committed Jan 28, 2022
commit f1f325edd7c3b489d43ad993b0df4232063c31b3
24 changes: 8 additions & 16 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
@@ -48,8 +48,7 @@ pub type au_asid_t = ::pid_t;
// making the type definition system dependent. Better not bind it exactly.
pub type kvm_t = ::c_void;

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_support_flags {
DEVSTAT_ALL_SUPPORTED = 0x00,
@@ -64,8 +63,7 @@ impl ::Clone for devstat_support_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_trans_flags {
DEVSTAT_NO_DATA = 0x00,
@@ -81,8 +79,7 @@ impl ::Clone for devstat_trans_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_tag_type {
DEVSTAT_TAG_SIMPLE = 0x00,
@@ -97,8 +94,7 @@ impl ::Clone for devstat_tag_type {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_match_flags {
DEVSTAT_MATCH_NONE = 0x00,
@@ -113,8 +109,7 @@ impl ::Clone for devstat_match_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_priority {
DEVSTAT_PRIORITY_MIN = 0x000,
@@ -135,8 +130,7 @@ impl ::Clone for devstat_priority {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_type_flags {
DEVSTAT_TYPE_DIRECT = 0x000,
@@ -168,8 +162,7 @@ impl ::Clone for devstat_type_flags {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_metric {
DSM_NONE,
@@ -226,8 +219,7 @@ impl ::Clone for devstat_metric {
}
}

#[cfg_attr(feature = "extra_traits", derive(Debug, Hash))]
#[derive(PartialEq, Eq)]
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
#[repr(u32)]
pub enum devstat_select_mode {
DS_SELECT_ADD,