-
Notifications
You must be signed in to change notification settings - Fork 104
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
Improve Hash256
implementation and add unit tests
#572
Conversation
Some issues with this PR:
|
|
Unified at the cost of an unnecessary allocation? I don't think so.
It's more idiomatic in most cases, but not always, so we definitely should not put deprecation on |
Rebased on Regarding the JSON-based tests, I still believe that it's too much for testing a simple decode function. Different from #571, I like how this PR comes with test cases where the intent is explained inline. This helps code readers understand what's being tested without all the JSON complexity, with each single piece of test data tailored to a specific scenario. So I'm keeping that. Dropping the JSON part tho. |
Description
This pull request aims to enhance the implementation of the
Hash256
type and introduce comprehensive unit tests to ensure its correctness and robustness.Changes Made:
Hash256
.Hash256
type.