From 5f136fbd0cd27e3b83c399c0014f3d0e0b13e284 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Wed, 4 Apr 2018 10:25:42 -0700 Subject: [PATCH] Remove some warnings. Not all of the warnings are removed, since although this code works, it still needs a significant amount of cleanup, editing, and polish. --- src/backend/avx2/edwards.rs | 8 ++------ src/backend/avx2/field.rs | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/backend/avx2/edwards.rs b/src/backend/avx2/edwards.rs index 9341ee9..c0ad9ac 100644 --- a/src/backend/avx2/edwards.rs +++ b/src/backend/avx2/edwards.rs @@ -14,16 +14,14 @@ #![allow(bad_style)] use core::convert::From; -use core::ops::{Index, Add, Sub, Mul, Neg}; -use core::borrow::Borrow; +use core::ops::{Add, Sub, Neg}; -use core::simd::{IntoBits, u32x8, i32x8}; +use core::simd::{IntoBits, u32x8}; use subtle::ConditionallyAssignable; use subtle::Choice; use edwards; -use scalar::Scalar; use scalar_mul::window::{LookupTable, OddLookupTable}; use traits::Identity; @@ -313,8 +311,6 @@ impl<'a> From<&'a edwards::EdwardsPoint> for OddLookupTable { mod test { use super::*; - use constants; - fn serial_add(P: edwards::EdwardsPoint, Q: edwards::EdwardsPoint) -> edwards::EdwardsPoint { use backend::u64::field::FieldElement64; diff --git a/src/backend/avx2/field.rs b/src/backend/avx2/field.rs index 2af68b2..96b4baf 100644 --- a/src/backend/avx2/field.rs +++ b/src/backend/avx2/field.rs @@ -268,7 +268,6 @@ impl FieldElement32x4 { let masks = u32x8::new((1<<26)-1, (1<<26)-1, (1<<25)-1, (1<<25)-1, (1<<26)-1, (1<<26)-1, (1<<25)-1, (1<<25)-1); - /// Compute the carry-out of each coefficient of v using a left shift. let carry = |v: u32x8| -> u32x8 { unsafe { use core::arch::x86_64::_mm256_srlv_epi32;