Skip to content

Derive PartialOrd and Ord for Denomination#3866

Closed
tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
tcharding:01-07-arbitrary-ord
Closed

Derive PartialOrd and Ord for Denomination#3866
tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
tcharding:01-07-arbitrary-ord

Conversation

@tcharding
Copy link
Copy Markdown
Member

Currently units::amount::Denomination does not implement PartialOrd or Ord. This prevents any type that includes a Denomination from being used in contexts that require these traits (e.g. as key to a BTreeMap). This is an unnecessary restriction. We should either implement the traits or implement ArbitraryOrd.

Whether to derive the traits or manually implement them is an open question.

Derive PartialOrd and Ord for Denomination.

Currently units::amount::Denomination does not implement PartialOrd or
Ord. This prevents any type that includes a Denomination from being used
in contexts that require these traits (e.g. as key to a BTreeMap). This
is an unnecessary restriction. We should either implement the traits or
implement ArbitraryOrd.

Whether to derive the traits or manually implement them is an open
question.

Derive `PartialOrd` and `Ord` for `Denomination`.
@tcharding
Copy link
Copy Markdown
Member Author

This PR led to #3865

@github-actions github-actions bot added the C-units PRs modifying the units crate label Jan 6, 2025
@tcharding
Copy link
Copy Markdown
Member Author

Draft until #3865 discussion culminates.

@tcharding tcharding marked this pull request as draft January 8, 2025 01:33
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Jan 20, 2025
In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Jan 22, 2025

Closing for same reason as: #3934 (comment)

@tcharding tcharding closed this Jan 22, 2025
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Feb 24, 2025
We are trying a new strategy to get to 1.0 more quickly - remove
`amount` and `fee` and release everything else.

In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Feb 24, 2025
We are trying a new strategy to get to 1.0 more quickly - remove
`amount` and `fee` and release everything else.

In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Feb 24, 2025
We are trying a new strategy to get to 1.0 more quickly - remove
`amount` and `fee` and release everything else.

In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Feb 24, 2025
We are trying a new strategy to get to 1.0 more quickly - remove
`amount` and `fee` and release everything else.

In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
tcharding added a commit to tcharding/rust-bitcoin that referenced this pull request Feb 24, 2025
We are trying a new strategy to get to 1.0 more quickly - remove
`amount` and `fee` and release everything else.

In preparation for release add a changelog entry, bump the version, and
update the lock files.

`v1.0` here we come.

Before we merge this we should add:

- rust-bitcoin#3934 or rust-bitcoin#3866
- rust-bitcoin#3933
- rust-bitcoin#3932
- rust-bitcoin#3929
- rust-bitcoin#3926
- rust-bitcoin#3923
- rust-bitcoin#3893
- rust-bitcoin#3866
- rust-bitcoin#3794
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.

1 participant