Update types to new tree_hash crate

This commit is contained in:
Paul Hauner
2019-04-16 14:14:38 +10:00
parent 3eaa06d758
commit b8c4c3308a
70 changed files with 284 additions and 234 deletions

View File

@@ -31,12 +31,10 @@ fn get_hashable_named_field_idents<'a>(struct_data: &'a syn::DataStruct) -> Vec<
///
/// The field attribute is: `#[tree_hash(skip_hashing)]`
fn should_skip_hashing(field: &syn::Field) -> bool {
for attr in &field.attrs {
if attr.tts.to_string() == "( skip_hashing )" {
return true;
}
}
false
field
.attrs
.iter()
.any(|attr| attr.into_token_stream().to_string() == "# [ tree_hash ( skip_hashing ) ]")
}
/// Implements `tree_hash::CachedTreeHashSubTree` for some `struct`.