diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-08-26 13:36:36 +0200 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-08-26 13:36:36 +0200 |
commit | 9569572f96a7f9517f8a63eebfacb125ad66e30a (patch) | |
tree | d156574282c50d852e882936866f4fef25fa1072 /src/sleep_register.rs | |
parent | f0d2a0ee7c560365b52a7de6e39af9c1b18cfa71 (diff) | |
download | geniza-9569572f96a7f9517f8a63eebfacb125ad66e30a.tar.gz geniza-9569572f96a7f9517f8a63eebfacb125ad66e30a.zip |
cargo fix (with cargo v1.37)
Diffstat (limited to 'src/sleep_register.rs')
-rw-r--r-- | src/sleep_register.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sleep_register.rs b/src/sleep_register.rs index e0ea5a4..7151c0e 100644 --- a/src/sleep_register.rs +++ b/src/sleep_register.rs @@ -53,7 +53,7 @@ pub trait HyperRegister { fn get_tree_entry(&mut self, tree_index: u64) -> Result<Vec<u8>>; } -impl HyperRegister { +impl dyn HyperRegister { fn hash_leaf(data: &[u8]) -> [u8; 40] { let mut buf = [0; 40]; u64::to_be(data.len() as u64).encode_fixed(&mut buf[32..40]); @@ -82,7 +82,7 @@ impl HyperRegister { } /// Hashes all the tree root parents for the given entry index (data index, not tree index). - pub fn hash_roots(reg: &mut HyperRegister, entry_index: u64) -> Result<Vec<u8>> { + pub fn hash_roots(reg: &mut dyn HyperRegister, entry_index: u64) -> Result<Vec<u8>> { let mut buf = [0; 32]; let mut hash = Blake2b::new(32); let mut index_buf = [0; 8]; @@ -130,7 +130,7 @@ impl HyperRegister { /// Finds the offset of the given data chunk in the linear appended data file (not a "checked /// out" individual file) - pub fn get_data_offset(reg: &mut HyperRegister, entry_index: u64) -> Result<u64> { + pub fn get_data_offset(reg: &mut dyn HyperRegister, entry_index: u64) -> Result<u64> { // TODO: this is a naive (linear) implementation // log(N) would go up previous parent nodes (eg, use root_nodes()) let mut sum: u64 = 0; |