summaryrefslogtreecommitdiff
path: root/src/merkle.rs
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2019-01-19 14:21:35 -0600
committerStuart Stock <stuart@int08h.com>2019-01-19 15:12:37 -0600
commitdda66ba5b6ab2fbdee3b9fcd92741b1127f9c597 (patch)
treeb1206f0f45ddb7634b6b0c313d6f63929b98aaa7 /src/merkle.rs
parent88f029137b7f519dd842ff745434ffaef4c05f82 (diff)
downloadroughenough-dda66ba5b6ab2fbdee3b9fcd92741b1127f9c597.zip
Rust 2018 edition migration
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();