Elide these lifetimes.

This commit is contained in:
Sean Bowe 2017-09-28 11:39:53 -06:00
parent bda22db9d5
commit 6708878f4c
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 6 additions and 6 deletions

View File

@ -93,11 +93,11 @@ impl<G: CurveProjective> Wnaf<(), Vec<G>, Vec<i64>> {
/// Given a base and a number of scalars, compute a window table and return a `Wnaf` object that /// Given a base and a number of scalars, compute a window table and return a `Wnaf` object that
/// can perform exponentiations with `.scalar(..)`. /// can perform exponentiations with `.scalar(..)`.
pub fn base<'a>( pub fn base(
&'a mut self, &mut self,
base: G, base: G,
num_scalars: usize num_scalars: usize
) -> Wnaf<usize, &'a [G], &'a mut Vec<i64>> ) -> Wnaf<usize, &[G], &mut Vec<i64>>
{ {
// Compute the appropriate window size based on the number of scalars. // Compute the appropriate window size based on the number of scalars.
let window_size = G::recommended_wnaf_for_num_scalars(num_scalars); let window_size = G::recommended_wnaf_for_num_scalars(num_scalars);
@ -116,10 +116,10 @@ impl<G: CurveProjective> Wnaf<(), Vec<G>, Vec<i64>> {
/// Given a scalar, compute its wNAF representation and return a `Wnaf` object that can perform /// Given a scalar, compute its wNAF representation and return a `Wnaf` object that can perform
/// exponentiations with `.base(..)`. /// exponentiations with `.base(..)`.
pub fn scalar<'a>( pub fn scalar(
&'a mut self, &mut self,
scalar: <<G as CurveProjective>::Scalar as PrimeField>::Repr scalar: <<G as CurveProjective>::Scalar as PrimeField>::Repr
) -> Wnaf<usize, &'a mut Vec<G>, &'a [i64]> ) -> Wnaf<usize, &mut Vec<G>, &[i64]>
{ {
// Compute the appropriate window size for the scalar. // Compute the appropriate window size for the scalar.
let window_size = G::recommended_wnaf_for_scalar(scalar); let window_size = G::recommended_wnaf_for_scalar(scalar);