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
hashes: make hex optional #2711
Draft
tcharding
wants to merge
8
commits into
rust-bitcoin:master
Choose a base branch
from
tcharding:04-23-hashes-make-hex-optional
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
hashes: make hex optional #2711
tcharding
wants to merge
8
commits into
rust-bitcoin:master
from
tcharding:04-23-hashes-make-hex-optional
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
ci
C-bitcoin
PRs modifying the bitcoin crate
C-hashes
PRs modifying the hashes crate
doc
labels
Apr 23, 2024
Pull Request Test Coverage Report for Build 8797148222Details
💛 - Coveralls |
We have a private function that makes use of the `Hash` trait to generically hash map entries. This usage makes patching the `hashes` module difficult. We can achieve the same thing by using a macro and passing in the concrete type. This is an internal change, no effect on logic or public API.
Clean up the test imports in the `p2p` module: - Use `use super::*` as is conventional. - Use `sha256d::Hash` as is conventional. Refactor, no logic changes.
In preparation for feature gating hex stuff pull the bytelike traits that depend on `hex` (ie, stringly stuff) out into a separate macro and call the new macro from the original. Structural change only, no behavioural change.
In preparation for feature gating a bunch of the `hmac` unit tests move the slicey (`AsRef`, `Borrow`, etc) tests so that all the display related tests are together. Code move only, no other changes.
This import is not needed, not sure why its not being flagged by `clippy`. No logic change.
In general smaller unit tests are better, and ones that have one assert and the "best" - or so they say. In this instance, done mainly in preparation for feature gating one of the tests in upcoming work. Refactor only, no test coverage change.
Make the `hex` dependency optional and feature gate code on "hex" as required.
tcharding
force-pushed
the
04-23-hashes-make-hex-optional
branch
from
May 17, 2024 02:59
e8eee0a
to
12f142d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft because the first 3 patches are #2770, this PR is just the last 5.
The first 4 patches of this PR are all preparatory, and introduce no logic changes.
What this PR mainly shows is how easy it is to close #2654 after we did #2770 - WIN.
Close: #2654