Skip to content

docs: improve documentation formatting, punctuation, and spelling#12

Merged
AsakuraMizu merged 2 commits into
rcore-os:mainfrom
mevinagrise:fix-docs
Apr 11, 2026
Merged

docs: improve documentation formatting, punctuation, and spelling#12
AsakuraMizu merged 2 commits into
rcore-os:mainfrom
mevinagrise:fix-docs

Conversation

@mevinagrise
Copy link
Copy Markdown
Contributor

@mevinagrise mevinagrise commented Mar 26, 2026

This PR improves the documentation comments in src/lib.rs to better align with Rust documentation standards (RFC 1574) and the project's coding guidelines.

Specific changes include:

  • Punctuation & Capitalization: Added missing periods at the end of single-line doc comments for methods like insert, remove, any, and test to ensure they form proper summary sentences. Capitalized the first letter of the bitset field documentation.
  • Spelling: Corrected a typo in the bitset doc comment (inavailable -> unavailable).
  • Comment Clarity: Improved an inline comment in dealloc_contiguous. Changed the descriptive // Check if the range is valid. to an intent-revealing comment // Prevent out-of-bounds access by ensuring the deallocation range fits within capacity., explaining the why rather than just the what.

Related Guidelines:

  • comment-punctuation: Ensure all full-sentence comments end with a period.
  • explain-why: Replace comments that describe what the code does with comments explaining the intent or reasoning.

Testing:

  • Ran cargo doc --no-deps to ensure documentation renders correctly.
  • Ran cargo test to ensure no code logic was affected.

@AsakuraMizu AsakuraMizu requested review from Copilot and hky1999 April 9, 2026 06:43
AsakuraMizu
AsakuraMizu previously approved these changes Apr 9, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR polishes Rust documentation comments in src/lib.rs to better align with Rust doc comment conventions (sentence-style summaries, punctuation, spelling) and improve inline comment clarity.

Changes:

  • Added missing punctuation/capitalization to several doc comments.
  • Fixed a spelling typo in a doc comment.
  • Reworded an inline comment in dealloc_contiguous to explain intent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
@AsakuraMizu AsakuraMizu self-requested a review April 10, 2026 04:24
@AsakuraMizu AsakuraMizu dismissed their stale review April 10, 2026 04:24

see copilot

@mevinagrise
Copy link
Copy Markdown
Contributor Author

I’ve updated the code based on Copilot’s feedback.

@AsakuraMizu AsakuraMizu merged commit 4921b8b into rcore-os:main Apr 11, 2026
5 checks passed
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.

3 participants