Address various clippy warnings/errors in zcash_primitives

This commit is contained in:
Jack Grigg
2019-08-02 11:25:00 +01:00
parent d65fe2cda9
commit 3a8efd9e67
18 changed files with 97 additions and 107 deletions

View File

@@ -16,8 +16,8 @@ use crate::{
JUBJUB,
};
pub const ZIP32_SAPLING_MASTER_PERSONALIZATION: &'static [u8; 16] = b"ZcashIP32Sapling";
pub const ZIP32_SAPLING_FVFP_PERSONALIZATION: &'static [u8; 16] = b"ZcashSaplingFVFP";
pub const ZIP32_SAPLING_MASTER_PERSONALIZATION: &[u8; 16] = b"ZcashIP32Sapling";
pub const ZIP32_SAPLING_FVFP_PERSONALIZATION: &[u8; 16] = b"ZcashSaplingFVFP";
// Common helper functions
@@ -83,9 +83,9 @@ impl ChildIndex {
}
fn to_index(&self) -> u32 {
match self {
&ChildIndex::Hardened(i) => i + (1 << 31),
&ChildIndex::NonHardened(i) => i,
match *self {
ChildIndex::Hardened(i) => i + (1 << 31),
ChildIndex::NonHardened(i) => i,
}
}
}