fix warnings

This commit is contained in:
psippl 2022-02-26 18:49:10 +01:00
parent 978c17dfa8
commit 99f6549c84
3 changed files with 2 additions and 13 deletions

View File

@ -172,7 +172,6 @@ fn trim_hex_prefix(str: &str) -> &str {
pub mod test {
use super::*;
use hex_literal::hex;
use proptest::proptest;
use serde_json::{from_str, to_string};
#[test]
@ -212,14 +211,4 @@ pub mod test {
))
);
}
#[test]
fn test_roundtrip() {
proptest!(|(bytes: [u8; 32])| {
let hash = Hash(bytes);
let json = to_string(&hash).unwrap();
let parsed = from_str(&json).unwrap();
assert_eq!(hash, parsed);
});
}
}

View File

@ -8,8 +8,7 @@ mod util;
use hash::*;
use hex_literal::hex;
use identity::*;
use num_bigint::{BigInt, Sign};
use poseidon_rs::Poseidon;
use num_bigint::{BigInt};
use poseidon_tree::*;
use protocol::*;

View File

@ -158,6 +158,7 @@ impl<H: Hasher> MerkleTree<H> {
proof.root(hash) == self.root()
}
#[allow(dead_code)]
pub fn leaves(&self) -> &[H::Hash] {
&self.nodes[(self.num_leaves() - 1)..]
}