Skip to content

chore(docs): unify rustdoc style across pallet-subtensor#2603

Draft
mcjkula wants to merge 7 commits intoopentensor:devnet-readyfrom
mcjkula:doc-cleanup
Draft

chore(docs): unify rustdoc style across pallet-subtensor#2603
mcjkula wants to merge 7 commits intoopentensor:devnet-readyfrom
mcjkula:doc-cleanup

Conversation

@mcjkula
Copy link
Copy Markdown

@mcjkula mcjkula commented Apr 20, 2026

Description

Standardizes rustdoc comments across pallets/subtensor/src/ on one canonical convention.

Split into 7 commits:

  1. e7ec631: strip decorative /// --- / /// === / banner lines
  2. 82f7793: normalize section headings (# Args -> # Arguments, etc.)
  3. 77ce515: replace Returns an error if: prose with named # Errors bullets
  4. 3917853: normalize event / error bullets to * 'Name': desc.
  5. b1d136d: convert /// NOTE: / WARNING: / TODO: admonitions to headings or //
  6. c35f571: move inline arg bullets under a proper # Arguments section
  7. e3abf8f: normalize argument / return bullets to * `name`: desc.

Verified locally: cargo clippy -p pallet-subtensor --all-targets -- -D warnings and cargo fmt --check.

Related Issue(s)

N/A

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

None. This change is confined to /// rustdoc comments and a small number of // developer comments inside pallets/subtensor/src/.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

N/A - documentation-only change, no UI surface.

Additional Notes

Commit 77ce515 is the only one that adds new information (error-name enumerations in 5 extrinsics). Every name was cross-checked against the real Error::<T>::* call sites. All other commits are just reformatting.

@mcjkula mcjkula marked this pull request as draft April 20, 2026 19:07
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.

1 participant