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

feat: implement count method for (non)fungible asset deltas #999

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

polydez
Copy link
Contributor

@polydez polydez commented Dec 2, 2024

This is needed for getting asset delta count without iteration over all of them.

@polydez polydez added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Dec 2, 2024
Comment on lines 236 to 237
/// Returns the number of fungible assets affected in the delta.
pub fn count(&self) -> usize {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we usually use num_ prefix rather than count. So, here it could be num_assets.

@polydez polydez requested a review from bobbinth December 2, 2024 09:22
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@polydez polydez merged commit ce02ee8 into next Dec 2, 2024
9 checks passed
@polydez polydez deleted the polydez-asset-count-in-delta branch December 2, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This PR does not require an entry in the `CHANGELOG.md` file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants