From 51f59565f5ff60297df0c169ff38f99eb27dd912 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 21 Feb 2017 04:15:09 +0000 Subject: [PATCH] =?UTF-8?q?Typo=20fix;=20Negateable=20=E2=86=92=20Negatabl?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixup on #22. --- src/curve.rs | 2 +- src/field.rs | 2 +- src/util.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/curve.rs b/src/curve.rs index b659980..b9c3848 100644 --- a/src/curve.rs +++ b/src/curve.rs @@ -87,7 +87,7 @@ use field::FieldElement; use scalar::Scalar; use util::bytes_equal_ct; use util::CTAssignable; -use util::CTNegateable; +use util::CTNegatable; // ------------------------------------------------------------------------ // Compressed points diff --git a/src/field.rs b/src/field.rs index e0e4767..aa632b1 100644 --- a/src/field.rs +++ b/src/field.rs @@ -803,7 +803,7 @@ impl FieldElement { mod test { use field::*; use test::Bencher; - use util::CTNegateable; + use util::CTNegatable; #[bench] fn bench_fieldelement_a_mul_a(b: &mut Bencher) { diff --git a/src/util.rs b/src/util.rs index 2d08f79..b0ab17d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -25,13 +25,13 @@ pub trait CTAssignable { /// /// Note: it is not necessary to implement this trait, as a generic /// implementation is provided. -pub trait CTNegateable +pub trait CTNegatable { /// Conditionally negate an element if `choice == 1u8`. fn conditional_negate(&mut self, choice: u8); } -impl CTNegateable for T +impl CTNegatable for T where T: CTAssignable, for<'a> &'a T: Neg { fn conditional_negate(&mut self, choice: u8) {