# HG changeset patch # User Paul Fisher # Date 1753987712 14400 # Node ID 5e4ea9650f87f82a840f950e313a704ac9ce75ec # Parent fb8b547b36b7acbf2808f30b0e854276bdc83732 Derive `hash` where it makes sense. diff -r fb8b547b36b7 -r 5e4ea9650f87 src/constants.rs --- a/src/constants.rs Thu Jul 31 14:45:38 2025 -0400 +++ b/src/constants.rs Thu Jul 31 14:48:32 2025 -0400 @@ -13,7 +13,7 @@ $viz:vis $name:ident($wraps:ty); ) => { $(#[$m])* - #[derive(Clone, Copy, Debug, PartialEq, Eq)] + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[repr(transparent)] $viz struct $name($wraps); @@ -265,7 +265,7 @@ } ) => { $(#[$om])* - #[derive(Copy, Clone, Debug, PartialEq, Eq)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum $name { $( $(#[$im])* diff -r fb8b547b36b7 -r 5e4ea9650f87 src/libpam/memory.rs --- a/src/libpam/memory.rs Thu Jul 31 14:45:38 2025 -0400 +++ b/src/libpam/memory.rs Thu Jul 31 14:48:32 2025 -0400 @@ -23,7 +23,7 @@ // This is the one place where we depend upon c_int being i32. // Ideally, we would be able to say `repr(c_int)` but we can't. $(#[$m])* - #[derive(Clone, Copy, Debug, Eq, PartialEq)] + #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] #[repr(i32)] $viz enum $name { $( diff -r fb8b547b36b7 -r 5e4ea9650f87 src/logging.rs --- a/src/logging.rs Thu Jul 31 14:45:38 2025 -0400 +++ b/src/logging.rs Thu Jul 31 14:48:32 2025 -0400 @@ -64,7 +64,7 @@ /// /// Their values are ordered monotonically, either increasing or decreasing, /// depending upon the implementation. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum Level { Error, Warn,