Skip to content

Conversation

tcharding
Copy link
Member

Improve the ops impls in the block module using the already present macros.

These comments to not add much value - remove them.
Next patch will move all the impls of `Add` and `Sub` into a macro call.
In order to make that patch smaller move the assign impls to be together
below the add/sub impls.

Code move only, no logic change.
We have a new macro for implementing ops with a bunch of reference
combos. Lets use it for block `Height` and `Interval`.

This patch is strictly additive.
We have a macro for implementing `AddAssign` and `SubAssign`.

Use the macro, gets us an additional ref impl for both.
@tcharding tcharding changed the title Increase ops impls in block module units: Increase ops impls in block module Mar 3, 2025
@github-actions github-actions bot added the C-units PRs modifying the units crate label Mar 3, 2025
Copy link
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 3ae21d5; successfully ran local tests; nice!

@tcharding
Copy link
Member Author

Bump please.

@apoelstra apoelstra merged commit ecffb40 into rust-bitcoin:master Mar 26, 2025
24 checks passed
@tcharding tcharding deleted the 03-03-units-block branch April 14, 2025 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-units PRs modifying the units crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants