Skip to content

docs(fast_io): drop restatement comments and apply rustdoc to public items - #4639

Merged
oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-fast-io-2026-05-21
May 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-fast-io-2026-05-21

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Walked every .rs file under crates/fast_io/ and removed restatement comments that echo the code below them.
  • Touched files: status.rs, syscall_batch.rs, splice/tests/linux/splice_to_file.rs.
  • The bulk of the crate was already well-curated. The audit confirmed the rest of crates/fast_io/ is clean: SAFETY blocks, #[allow(unsafe_code)] justifications, kernel version gates, Linux/Windows quirks, copy_file_range fallback notes, and upstream rsync citations are all preserved verbatim.

Scope

Touched:

  • crates/fast_io/src/status.rs - dropped three // <Platform> compile-time capabilities comments that restate the #[cfg(target_os = ...)] directly below them.
  • crates/fast_io/src/syscall_batch.rs - dropped // Verify ... and // First should succeed restatement comments in tests; tightened two // Below threshold - should use individual path / // Results should be in original order despite grouping notes into single sentences describing intent.
  • crates/fast_io/src/splice/tests/linux/splice_to_file.rs - dropped a // Verify file contents. restatement.

Excluded from this pass (active in-flight work in #4618):

  • crates/fast_io/src/secure_dir.rs
  • crates/fast_io/src/lib.rs

Diff size

3 files changed, 9 insertions(+), 24 deletions(-).

Safety preservation

0 SAFETY blocks removed or modified. Every // SAFETY: / // Safety: comment, every #[allow(unsafe_code)] justification, every kernel-version gate (5.6+ for io_uring, 5.19+ for splice multi-pipe, 3.11+ for O_TMPFILE), every Windows API quirk note (IOCP completion key reservation, CopyFileEx callback, ERROR_INSUFFICIENT_BUFFER handling), every copy_file_range cross-filesystem fallback note, and every upstream rsync reference (io.c, syscall.c, socket.c, fileio.c, util1.c) is preserved verbatim.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings
  • cargo check -p fast_io --all-features
  • cargo nextest run -p fast_io --features io_uring -E 'test(splice) or test(iocp_stub) or test(buffer_ring)' (16 passed)
  • Full nextest matrix in CI

…items

- Remove restatement comments in status::platform_io_capabilities and
  syscall_batch tests that echo the code below them.
- Tighten two comments in syscall_batch tests to describe routing intent
  and ordering invariant instead of restating the assertion.
- Preserve every SAFETY block, upstream rsync citation, and meaningful
  WHY note across the crate.

Excluded from this pass: `secure_dir.rs` and `lib.rs` (active in-flight
work in #4618). The audit walked every other `.rs` file under
`crates/fast_io/`; the bulk of the crate was already clean - SAFETY
docs, kernel version gates, and platform quirks all preserved verbatim.
@oferchen
oferchen merged commit 42e7d1a into master May 21, 2026
7 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 21, 2026
@oferchen
oferchen deleted the docs/comment-cleanup-fast-io-2026-05-21 branch May 21, 2026 14:09
oferchen added a commit that referenced this pull request Aug 24, 2026
…items (#4639)

- Remove restatement comments in status::platform_io_capabilities and
  syscall_batch tests that echo the code below them.
- Tighten two comments in syscall_batch tests to describe routing intent
  and ordering invariant instead of restating the assertion.
- Preserve every SAFETY block, upstream rsync citation, and meaningful
  WHY note across the crate.

Excluded from this pass: `secure_dir.rs` and `lib.rs` (active in-flight
work in #4618). The audit walked every other `.rs` file under
`crates/fast_io/`; the bulk of the crate was already clean - SAFETY
docs, kernel version gates, and platform quirks all preserved verbatim.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant