Add tree_hash_derive crate

This commit is contained in:
Paul Hauner
2019-04-15 15:45:05 +10:00
parent 354f823c16
commit 2be05a466f
10 changed files with 163 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ fn works_when_embedded() {
assert_eq!(&merkle[0..32], &root[..]);
}
impl CachedTreeHashSubtree<InternalCache> for InternalCache {
impl CachedTreeHashSubTree<InternalCache> for InternalCache {
fn item_type() -> ItemType {
ItemType::Composite
}
@@ -131,7 +131,7 @@ pub struct Inner {
pub d: u64,
}
impl CachedTreeHashSubtree<Inner> for Inner {
impl CachedTreeHashSubTree<Inner> for Inner {
fn item_type() -> ItemType {
ItemType::Composite
}
@@ -203,7 +203,7 @@ pub struct Outer {
pub c: u64,
}
impl CachedTreeHashSubtree<Outer> for Outer {
impl CachedTreeHashSubTree<Outer> for Outer {
fn item_type() -> ItemType {
ItemType::Composite
}