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 IntoIterator for Coins #1806

Merged
merged 9 commits into from
Aug 16, 2023
Merged

Implement IntoIterator for Coins #1806

merged 9 commits into from
Aug 16, 2023

Conversation

chipshort
Copy link
Collaborator

closes #1804
Allows iterating over Coins, both borrowed and owned.

Copy link
Contributor

@jawoznia jawoznia left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Nice work and good to get this moving. However, let have a second though about the amount of symbols and code this will add. We might be better off storing Coin values in the Coins map.

packages/std/src/coins.rs Show resolved Hide resolved
packages/std/src/coin.rs Outdated Show resolved Hide resolved
packages/std/src/coin.rs Outdated Show resolved Hide resolved
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.

Very nice. Some smaller comments but looks very good overall.

We need a CHANGELOG entry for the new iterator functionality and CoinFromStrError, CoinsError.

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 Show resolved Hide resolved
packages/std/src/coins.rs Show resolved Hide resolved
@chipshort chipshort merged commit 9d1737d into main Aug 16, 2023
3 checks passed
@chipshort chipshort deleted the 1804-coin-iterator branch August 16, 2023 13:02
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.

Implement Iterator<Item = Coin> for Coins
3 participants