Fix various lints

This commit is contained in:
Jack Grigg 2020-05-22 18:52:35 +12:00
parent a22957b575
commit 4edff96321
5 changed files with 9 additions and 15 deletions

View File

@ -340,7 +340,7 @@ impl fmt::Display for SynthesisError {
write!(f, "I/O error: ")?;
e.fmt(f)
} else {
write!(f, "{}", self.description())
write!(f, "{}", self)
}
}
}

View File

@ -899,7 +899,7 @@ impl fmt::Display for GroupDecodingError {
GroupDecodingError::CoordinateDecodingError(description) => {
write!(f, "{} decoding error", description)
}
_ => write!(f, "{}", self.description()),
_ => write!(f, "{}", self),
}
}
}

View File

@ -33,5 +33,5 @@ mod test_vectors;
use crate::jubjub::JubjubBls12;
lazy_static! {
pub static ref JUBJUB: JubjubBls12 = { JubjubBls12::new() };
pub static ref JUBJUB: JubjubBls12 = JubjubBls12::new();
}

View File

@ -23,19 +23,13 @@ use crate::{keys::OutgoingViewingKey, JUBJUB};
pub const KDF_SAPLING_PERSONALIZATION: &[u8; 16] = b"Zcash_SaplingKDF";
pub const PRF_OCK_PERSONALIZATION: &[u8; 16] = b"Zcash_Derive_ock";
const COMPACT_NOTE_SIZE: usize = (
1 + // version
const COMPACT_NOTE_SIZE: usize = 1 + // version
11 + // diversifier
8 + // value
32
// rcv
);
32; // rcv
const NOTE_PLAINTEXT_SIZE: usize = COMPACT_NOTE_SIZE + 512;
const OUT_PLAINTEXT_SIZE: usize = (
32 + // pk_d
32
// esk
);
const OUT_PLAINTEXT_SIZE: usize = 32 + // pk_d
32; // esk
const ENC_CIPHERTEXT_SIZE: usize = NOTE_PLAINTEXT_SIZE + 16;
const OUT_CIPHERTEXT_SIZE: usize = OUT_PLAINTEXT_SIZE + 16;

View File

@ -14,9 +14,9 @@ pub mod amount;
pub use self::amount::Amount;
// π_A + π_B + π_C
pub const GROTH_PROOF_SIZE: usize = (48 + 96 + 48);
pub const GROTH_PROOF_SIZE: usize = 48 + 96 + 48;
// π_A + π_A' + π_B + π_B' + π_C + π_C' + π_K + π_H
const PHGR_PROOF_SIZE: usize = (33 + 33 + 65 + 33 + 33 + 33 + 33 + 33);
const PHGR_PROOF_SIZE: usize = 33 + 33 + 65 + 33 + 33 + 33 + 33 + 33;
const ZC_NUM_JS_INPUTS: usize = 2;
const ZC_NUM_JS_OUTPUTS: usize = 2;