Suppress warnings about square() on UnpackedScalars

This commit is contained in:
Henry de Valence 2018-03-22 12:06:00 -07:00
parent 0ba5c72122
commit f2e44898ee
2 changed files with 2 additions and 0 deletions

View file

@ -341,6 +341,7 @@ impl Scalar32 {
/// Compute `a^2` (mod l).
#[inline(never)]
#[allow(dead_code)] // XXX we don't expose square() via the Scalar API
pub fn square(&self) -> Scalar32 {
let aa = Scalar32::montgomery_reduce(&Scalar32::square_internal(self));
Scalar32::montgomery_reduce(&Scalar32::mul_internal(&aa, &constants::RR))

View file

@ -270,6 +270,7 @@ impl Scalar64 {
/// Compute `a^2` (mod l)
#[inline(never)]
#[allow(dead_code)] // XXX we don't expose square() via the Scalar API
pub fn square(&self) -> Scalar64 {
let aa = Scalar64::montgomery_reduce(&Scalar64::square_internal(self));
Scalar64::montgomery_reduce(&Scalar64::mul_internal(&aa, &constants::RR))