summaryrefslogtreecommitdiff
path: root/src/merkle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/merkle.rs')
-rw-r--r--src/merkle.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/merkle.rs b/src/merkle.rs
index 69e6c00..7bb2db4 100644
--- a/src/merkle.rs
+++ b/src/merkle.rs
@@ -16,9 +16,7 @@
//! Merkle Tree implementation using SHA-512 and the Roughtime leaf and node tweak values.
//!
-extern crate ring;
-
-use self::ring::digest;
+use ring::digest;
use super::{HASH_LENGTH, TREE_LEAF_TWEAK, TREE_NODE_TWEAK};
type Data = Vec<u8>;
@@ -97,7 +95,7 @@ impl MerkleTree {
}
pub fn reset(&mut self) {
- for mut level in &mut self.levels {
+ for level in &mut self.levels {
level.clear();
}
}
@@ -152,7 +150,7 @@ pub fn root_from_paths(mut index: usize, data: &[u8], paths: &[u8]) -> Hash {
#[cfg(test)]
mod test {
- use merkle::*;
+ use crate::merkle::*;
fn test_paths_with_num(num: usize) {
let mut merkle = MerkleTree::new();