Clean warnings.

This commit is contained in:
Henry de Valence 2019-12-04 11:59:31 -08:00
parent 24d856de2c
commit 19af25485b
4 changed files with 9 additions and 10 deletions

View File

@ -25,7 +25,7 @@ impl HStar {
}
/// Consume `self` to compute the hash output.
pub fn finalize(mut self) -> Scalar {
pub fn finalize(self) -> Scalar {
Scalar::from_bytes_wide(self.state.finalize().as_array())
}
}

View File

@ -1,6 +1,6 @@
use std::{convert::TryFrom, marker::PhantomData};
use crate::{Binding, Error, Randomizer, Scalar, SigType, Signature, SpendAuth};
use crate::{Error, Randomizer, Scalar, SigType, Signature};
/// A refinement type for `[u8; 32]` indicating that the bytes represent
/// an encoding of a RedJubJub public key.
@ -72,13 +72,14 @@ impl<T: SigType> PublicKey<T> {
}
/// Randomize this public key with the given `randomizer`.
pub fn randomize(&self, randomizer: Randomizer) -> PublicKey<T> {
pub fn randomize(&self, _randomizer: Randomizer) -> PublicKey<T> {
unimplemented!();
}
/// Verify a purported `signature` over `msg` made by this public key.
// This is similar to impl signature::Verifier but without boxed errors
pub fn verify(&self, msg: &[u8], signature: &Signature<Binding>) -> Result<(), Error> {
pub fn verify(&self, msg: &[u8], signature: &Signature<T>) -> Result<(), Error> {
#![allow(non_snake_case)]
use crate::HStar;
let r = {

View File

@ -1,8 +1,6 @@
use std::{convert::TryFrom, marker::PhantomData};
use std::marker::PhantomData;
use crate::{
Binding, Error, PublicKey, PublicKeyBytes, Randomizer, Scalar, SigType, Signature, SpendAuth,
};
use crate::{PublicKey, Randomizer, Scalar, SigType, Signature};
use rand_core::{CryptoRng, RngCore};
@ -52,7 +50,7 @@ impl<T: SigType> SecretKey<T> {
}
/// Randomize this public key with the given `randomizer`.
pub fn randomize(&self, randomizer: Randomizer) -> PublicKey<T> {
pub fn randomize(&self, _randomizer: Randomizer) -> PublicKey<T> {
unimplemented!();
}

View File

@ -1,4 +1,4 @@
use std::{convert, fmt, marker::PhantomData};
use std::marker::PhantomData;
use crate::SigType;