Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Coins helper #1687

Merged
merged 19 commits into from
Jun 21, 2023
Merged

Implement Coins helper #1687

merged 19 commits into from
Jun 21, 2023

Conversation

chipshort
Copy link
Collaborator

closes #1683

based on #1489

@chipshort chipshort marked this pull request as ready for review May 22, 2023 15:12
packages/std/src/coins.rs Outdated Show resolved Hide resolved
packages/std/src/coins.rs Outdated Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
packages/std/src/coins.rs Outdated Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
packages/std/src/coins.rs Outdated Show resolved Hide resolved
packages/std/src/coins.rs Outdated Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
@webmaster128
Copy link
Member

As discussed, let's add mutable add and sub on Coins for impl Into<FancyTrait> where FancyTrait is some magic that allows looping through &Coin.

Also it would be cool to have From<Coin> for Coins as a non-failable constructor.

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Just one open question. Then we need a CHANGELOG entry and can ship this in 1.3.

Great work! Also thank you @larry0x for starting the effort.

packages/std/src/coins.rs Show resolved Hide resolved
@webmaster128
Copy link
Member

LGTM. Could you rebase this onto release/1.3?

@chipshort chipshort force-pushed the chipshort/issue1683 branch 2 times, most recently from 50d9e09 to 9bec427 Compare June 21, 2023 08:34
@chipshort chipshort changed the base branch from main to release/1.3 June 21, 2023 08:35
@webmaster128
Copy link
Member

Regarding

Revert "Use Coin's FromStr impl in FromStr impl of Coins"
This reverts commit 39dc511.

I think we can backport #1684 to 1.3 first and then use it here. Would be nice to have anyways.

@chipshort chipshort force-pushed the chipshort/issue1683 branch 2 times, most recently from 09990c2 to df8ff96 Compare June 21, 2023 12:15
@chipshort chipshort merged commit faf6cd9 into release/1.3 Jun 21, 2023
3 checks passed
@chipshort chipshort deleted the chipshort/issue1683 branch June 21, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Coins
3 participants