Skip to content

Use concrete type for all_zeros call#2774

Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:05-16-concrete-types
May 16, 2024
Merged

Use concrete type for all_zeros call#2774
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:05-16-concrete-types

Conversation

@tcharding
Copy link
Copy Markdown
Member

Currently we use the Hash trait in a bunch of places to call all_zeros. We are attempting to improve the hashes API and this usage is both unnecessary and also hindering that effort.

Use the concrete type (e.g. BlockHash) instead of calling through the trait method.

Refactor only, no logic changes.

Currently we use the `Hash` trait in a bunch of places to call
`all_zeros`. We are attempting to improve the `hashes` API and this
usage is both unnecessary and also hindering that effort.

Use the concrete type (e.g. `BlockHash`) instead of calling through the
trait method.

Refactor only, no logic changes.
@github-actions github-actions bot added the C-bitcoin PRs modifying the bitcoin crate label May 15, 2024
Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK f3c80ea I contend that this meets one-ACK carve-out #4 "code moves that do not change the API"

@apoelstra apoelstra merged commit 03bab9c into rust-bitcoin:master May 16, 2024
@tcharding tcharding deleted the 05-16-concrete-types branch May 17, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bitcoin PRs modifying the bitcoin crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants