mirror of
https://github.com/vacp2p/semaphore-rs.git
synced 2025-02-24 01:28:28 +00:00
fix warnings
This commit is contained in:
parent
978c17dfa8
commit
99f6549c84
11
src/hash.rs
11
src/hash.rs
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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::*;
|
||||
|
||||
|
@ -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)..]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user