Skip to content

polish(token): run localized linter and formatter on token module - #620

Open
Fayyo wants to merge 2 commits into
BCPathway:mainfrom
Fayyo:chore/500-lint-token-module
Open

polish(token): run localized linter and formatter on token module#620
Fayyo wants to merge 2 commits into
BCPathway:mainfrom
Fayyo:chore/500-lint-token-module

Conversation

@Fayyo

@Fayyo Fayyo commented Jul 29, 2026

Copy link
Copy Markdown

Closes #500

Ran cargo clippy and cargo fmt on bc-forge-token, fixing all warnings:

lib.rs:

  • Added NatSpec doc comments to DataKey variants: Decimals, Name, Symbol, Supply, MaxSupply
  • Wrapped code identifiers in backticks in existing doc comments (AdminKey::Admin, AllowanceData)
  • Added #[must_use] to read-only public functions (admin, supply, get_max_supply)

rate_limit.rs:

  • Wrapped function names in backticks in doc comments (transfer_from, burn_from)

reentrancy_guard.rs:

  • Derived Eq on ReentrancyGuardState (already derived PartialEq)
  • Made ReentrancyGuard::new const
  • Replaced manual if...panic! with assert! in require_not_entered

Verification:

  • cargo clippy -p bc-forge-token — 0 warnings
  • cargo fmt --check -p bc-forge-token — exit 0
  • cargo test -p bc-forge-token — 24/24 pass
  • cargo test --workspace — all 136 tests pass

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Fayyo 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

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.

[Docs & Polish] Run localized linter on token module

1 participant