You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by km...@apache.org on 2020/05/05 06:39:25 UTC
[incubator-milagro-crypto-rust] 39/44: Add equality checks
This is an automated email from the ASF dual-hosted git repository.
kmccusker pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-rust.git
commit 1fd5b331db5cadb7efc3d09857051e904763f75e
Author: Kirk Baird <ba...@outlook.com>
AuthorDate: Tue Apr 28 17:17:38 2020 +1000
Add equality checks
Signed-off-by: Kirk Baird <ba...@outlook.com>
---
src/ecp.rs | 2 ++
src/ecp2.rs | 2 ++
src/fp.rs | 2 ++
src/fp12.rs | 2 ++
src/fp2.rs | 2 ++
src/fp4.rs | 2 ++
6 files changed, 12 insertions(+)
diff --git a/src/ecp.rs b/src/ecp.rs
index 609ab75..573e016 100644
--- a/src/ecp.rs
+++ b/src/ecp.rs
@@ -40,6 +40,8 @@ impl PartialEq for ECP {
}
}
+impl Eq for ECP {}
+
impl fmt::Display for ECP {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "ECP: [ {}, {}, {} ]", self.x, self.y, self.z)
diff --git a/src/ecp2.rs b/src/ecp2.rs
index 25f7175..14d9d5e 100644
--- a/src/ecp2.rs
+++ b/src/ecp2.rs
@@ -39,6 +39,8 @@ impl PartialEq for ECP2 {
}
}
+impl Eq for ECP2 {}
+
impl fmt::Display for ECP2 {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "ECP2: [ {}, {}, {} ]", self.x, self.y, self.z)
diff --git a/src/fp.rs b/src/fp.rs
index f1454c5..aa86eb6 100644
--- a/src/fp.rs
+++ b/src/fp.rs
@@ -38,6 +38,8 @@ impl PartialEq for FP {
}
}
+impl Eq for FP {}
+
impl fmt::Display for FP {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "FP: [ {} ]", self.tostring())
diff --git a/src/fp12.rs b/src/fp12.rs
index e0dc648..254cb17 100644
--- a/src/fp12.rs
+++ b/src/fp12.rs
@@ -46,6 +46,8 @@ impl PartialEq for FP12 {
}
}
+impl Eq for FP12 {}
+
impl FP12 {
pub fn new() -> FP12 {
FP12 {
diff --git a/src/fp2.rs b/src/fp2.rs
index 12920f4..72e1f8f 100644
--- a/src/fp2.rs
+++ b/src/fp2.rs
@@ -37,6 +37,8 @@ impl PartialEq for FP2 {
}
}
+impl Eq for FP2 {}
+
impl fmt::Display for FP2 {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "FP2: [ {}, {} ]", self.a, self.b)
diff --git a/src/fp4.rs b/src/fp4.rs
index 88b5d03..b4a24e4 100644
--- a/src/fp4.rs
+++ b/src/fp4.rs
@@ -34,6 +34,8 @@ impl PartialEq for FP4 {
}
}
+impl Eq for FP4 {}
+
impl FP4 {
pub fn new() -> FP4 {
FP4 {