Fix Borrow/Hash inconsistency on Payment* types#4692
Conversation
|
I've assigned @valentinewallace as a reviewer! |
|
No issues found. All manual This version of the PR resolves my prior cross-cutting concern: The No inline comments posted — the changed lines are correct and the previously-flagged sibling types are now fixed. |
`Borrow`'d values are required to `Hash` identically to the original object so that a `Borrow`ed key can be used in place of an owned one in a `HashMap` lookup. We'd violated this on our `Payment*` types, which we fix here. Note that changing the `Hash` implementation is generally not considered an API-breaking change and this seems like a useful fix. Reported by Project Loupe.
419c8ed to
a1ad1a3
Compare
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
|
Skipping backport because this isn't actually a bug, even if the code is super sketch - rust-bitcoin/rust-bitcoin#6365 |
Borrow'd values are required toHashidentically to the original object so that aBorrowed key can be used in place of an owned one in aHashMaplookup.We'd violated this on our
Payment*types, which we fix here. Note that changing theHashimplementation is generally not considered an API-breaking change and this seems like a useful fix.Reported by Project Loupe.