plan: Derive PartialEq, Eq, Hash for Assets#888
Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom Jan 10, 2026
Merged
plan: Derive PartialEq, Eq, Hash for Assets#888apoelstra merged 1 commit intorust-bitcoin:masterfrom
apoelstra merged 1 commit intorust-bitcoin:masterfrom
Conversation
Member
|
Yeah, for sure. This is just a big container type. |
Member
|
Nice, it worked. |
Member
|
Hmm, no, it didn't. It pushed the github merge with no signature. Crap. |
Member
|
Force-pushed the merge away. Will try to fix and re-push. |
apoelstra
added a commit
that referenced
this pull request
Jan 10, 2026
2d8e99d plan: Derive PartialEq, Eq, Hash for Assets (lmorett1) Pull request description: Adds `PartialEq`, `Eq`, and `Hash` derives to the `Assets` struct, enabling it to be used as a hashmap key and compared for equality. All fields in `Assets` already implement these traits (BTreeSet, Option, etc.), and similar structs in the same module like `CanSign` and `TaprootCanSign` already derive them. This makes the API more consistent and useful for testing and practical applications where comparing or storing `Assets` instances is needed. ACKs for top commit: apoelstra: ACK 2d8e99d; successfully ran local tests Tree-SHA512: f0bb165a743be6b6fce6f13d995d256b92eaa5c1daa6870ea9edb9aabbf6594e1f7501812a98e98da0da0a8f64802a1c93bbeaba57b8f4a346b1083ef673d903
Member
|
Done. Will move on to another PR and see what's up with my "determine whether commit has been signed" logic.. |
This file contains hidden or 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
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.
Adds
PartialEq,Eq, andHashderives to theAssetsstruct, enabling it to be used as a hashmap key and compared for equality.All fields in
Assetsalready implement these traits (BTreeSet, Option, etc.), and similar structs in the same module likeCanSignandTaprootCanSignalready derive them. This makes the API more consistent and useful for testing and practical applications where comparing or storingAssetsinstances is needed.