Derive PartialOrd and Ord for Denomination#3866
Closed
tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
Closed
Derive PartialOrd and Ord for Denomination#3866tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
PartialOrd and Ord for Denomination#3866tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
Conversation
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`.
Member
Author
|
This PR led to #3865 |
Member
Author
|
Draft until #3865 discussion culminates. |
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
Member
Author
|
Closing for same reason as: #3934 (comment) |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PartialOrdandOrdforDenomination.