Fix clippy complaints.

This commit is contained in:
Kris Nuttycombe 2023-03-16 17:19:08 -06:00
parent 71557cc0e3
commit 30a1b7b62b
2 changed files with 2 additions and 0 deletions

View File

@ -291,6 +291,7 @@ impl<H, const DEPTH: u8> CommitmentTree<H, DEPTH> {
}
}
#[allow(clippy::result_unit_err)]
pub fn from_parts(
left: Option<H>,
right: Option<H>,

View File

@ -15,6 +15,7 @@ pub struct MerklePath<H, const DEPTH: u8> {
impl<H, const DEPTH: u8> MerklePath<H, DEPTH> {
/// Constructs a Merkle path directly from a path and position.
#[allow(clippy::result_unit_err)]
pub fn from_parts(auth_path: Vec<(H, bool)>, position: u64) -> Result<Self, ()> {
if auth_path.len() == usize::from(DEPTH) {
Ok(MerklePath {