Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TreeHashMut #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add TreeHashMut #24

wants to merge 1 commit into from

Conversation

michaelsproul
Copy link
Member

Define a new TreeHashMut trait which takes &mut self

This might be a cleaner alternative to:

Although we got bogged down in the Milhouse changes, especially around supporting nested lists: List<List<u64, N>, M> is troublesome because the T in List<T> should probably implement TreeHashMut, but we don't have mutable access to the elements of an immutable list.

Another alternative might be to embrace interior mutability in Milhouse so that TreeHash can be implemented without mutation altogether.

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (12d828c) to head (6ea7d0f).

Files with missing lines Patch % Lines
tree_hash/src/lib.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
- Coverage   79.66%   78.14%   -1.52%     
==========================================
  Files           6        6              
  Lines         295      302       +7     
==========================================
+ Hits          235      236       +1     
- Misses         60       66       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant