From 865bfd7b7711b007f9a3687be1409d6ae23fa18b Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Sat, 16 Nov 2019 15:25:18 +0100 Subject: [PATCH 1/2] Make batch_normalization more flexible with BorrowMut --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index be78b2a..583b8bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -35,7 +35,7 @@ pub trait CurveProjective: /// Normalizes a slice of projective elements so that /// conversion to affine is cheap. - fn batch_normalization(v: &mut [Self]); + fn batch_normalization>(v: &mut [S]); /// Checks if the point is already "normalized" so that /// cheap affine conversion is possible. From 4c033f8d5ab9d5851ba3fff79f3679497aa2a942 Mon Sep 17 00:00:00 2001 From: Jeff Burdges Date: Sat, 16 Nov 2019 15:29:44 +0100 Subject: [PATCH 2/2] Impl PartialEq, Eq, PartialOrd, Ord, Hash for EncodedPoint --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 583b8bd..290d0f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,7 +121,8 @@ pub trait CurveAffine: /// An encoded elliptic curve point, which should essentially wrap a `[u8; N]`. pub trait EncodedPoint: - Sized + Send + Sync + AsRef<[u8]> + AsMut<[u8]> + Clone + Copy + 'static + Sized + Send + Sync + AsRef<[u8]> + AsMut<[u8]> + Clone + Copy + + PartialOrd + Ord + PartialEq + Eq + ::std::hash::Hash + 'static { type Affine: CurveAffine;