Skip to content

docs: add doc-comments to public functions in stats.rs (#702) - #732

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
christy-dev4:fix/issue-702-stats-docs
Aug 30, 2026
Merged

docs: add doc-comments to public functions in stats.rs (#702)#732
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
christy-dev4:fix/issue-702-stats-docs

Conversation

@christy-dev4

Copy link
Copy Markdown

Expand doc-comments on public functions in stats.rs

Summary

Closes #702

The public functions in contracts/split/src/stats.rs
(get_stats, increment, invoice_created, volume_added,
recipients_paid) had brief doc comments but none documented their parameters
or return values. This PR expands every public-function doc comment to describe
its env parameter, the semantic meaning of each numeric argument, and what the
returned Stats tuple represents, so callers and integrators can use the stats
module without reading the implementation.

What changed

  • get_stats — documents the (total_invoices, total_volume, total_recipients_paid)
    tuple layout and the env parameter.
  • increment — documents all four parameters and the StatsOverflow failure mode.
  • invoice_created / volume_added / recipients_paid — document parameters and
    return, including the InvalidAmount guard on volume_added.

The Stats type alias doc and all function bodies are unchanged.

Verification

Documentation-only; compiles unaffected. (CI on main is red for unrelated,
pre-existing reasons documented in the other split PRs.)

closes #702

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@christy-dev4 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Kingsman-99
Kingsman-99 merged commit 5f0c8e8 into Stellar-split:main Aug 30, 2026
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 doc-comments to public functions in stats.rs

2 participants