Prechádzať zdrojové kódy

Merge #755

755: Add Hash trait for enum_with_unknown macro r=Dirbaio a=ssrlive

Please approve this patch, it is important for my app.

Co-authored-by: ssrlive <30760636+ssrlive@users.noreply.github.com>
bors[bot] 2 rokov pred
rodič
commit
fbafffc693
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/macros.rs

+ 1 - 1
src/macros.rs

@@ -41,7 +41,7 @@ macro_rules! enum_with_unknown {
             ),+ $(,)?
         }
     ) => {
-        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
+        #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
         #[cfg_attr(feature = "defmt", derive(defmt::Format))]
         $( #[$enum_attr] )*
         pub enum $name {