Skip to content

Commit d3f7df7

Browse files
committed
Merge #888: plan: Derive PartialEq, Eq, Hash for Assets
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
2 parents f52ad1a + 2d8e99d commit d3f7df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl TaprootAvailableLeaves {
494494
}
495495

496496
/// The Assets we can use to satisfy a particular spending path
497-
#[derive(Debug, Default, Clone)]
497+
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
498498
pub struct Assets {
499499
/// Keys the user can sign for, and how.
500500
///

0 commit comments

Comments
 (0)