Fix clippy complaints.
This commit is contained in:
parent
71557cc0e3
commit
30a1b7b62b
|
@ -291,6 +291,7 @@ impl<H, const DEPTH: u8> CommitmentTree<H, DEPTH> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::result_unit_err)]
|
||||||
pub fn from_parts(
|
pub fn from_parts(
|
||||||
left: Option<H>,
|
left: Option<H>,
|
||||||
right: Option<H>,
|
right: Option<H>,
|
||||||
|
|
|
@ -15,6 +15,7 @@ pub struct MerklePath<H, const DEPTH: u8> {
|
||||||
|
|
||||||
impl<H, const DEPTH: u8> MerklePath<H, DEPTH> {
|
impl<H, const DEPTH: u8> MerklePath<H, DEPTH> {
|
||||||
/// Constructs a Merkle path directly from a path and position.
|
/// 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, ()> {
|
pub fn from_parts(auth_path: Vec<(H, bool)>, position: u64) -> Result<Self, ()> {
|
||||||
if auth_path.len() == usize::from(DEPTH) {
|
if auth_path.len() == usize::from(DEPTH) {
|
||||||
Ok(MerklePath {
|
Ok(MerklePath {
|
||||||
|
|
Loading…
Reference in New Issue