Bläddra i källkod

crypto: impl PartialEq and Clone for Nullifier

ghassmo 4 år sedan
förälder
incheckning
d5eb67ad56
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      src/crypto/nullifier.rs

+ 8 - 0
src/crypto/nullifier.rs

@@ -5,6 +5,8 @@ use crate::{
     serial::{Decodable, Encodable},
     serial::{Decodable, Encodable},
 };
 };
 
 
+
+#[derive(Debug, Clone)]
 pub struct Nullifier {
 pub struct Nullifier {
     pub repr: [u8; 32],
     pub repr: [u8; 32],
 }
 }
@@ -28,3 +30,9 @@ impl Decodable for Nullifier {
         })
         })
     }
     }
 }
 }
+
+impl PartialEq for Nullifier {
+    fn eq(&self, other: &Self) -> bool {
+        self.repr == other.repr
+    }
+}