Skip to content

docs(rsync_io): drop restatement comments, apply rustdoc to public items#4596

Merged
oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-rsync-io-v2
May 20, 2026
Merged

docs(rsync_io): drop restatement comments, apply rustdoc to public items#4596
oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-rsync-io-v2

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

Scope

rsync_io already enforces #![deny(missing_docs)], so the public API
documentation coverage is complete by construction; the comment hygiene
across the crate is already in good shape (97 source files, ~4k //
lines, almost all carrying WHY content - FFI invariants, kernel quirks,
upstream-rsync references, fallback rationale). The targeted cleanup
landed in 9 files for a net -14 lines.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings
  • cargo nextest run -p rsync_io --all-features (971 passed)

… items

Removes a small set of restatement comments in tests and SSH operand
parsing where the line above already echoes the test name or the
immediately following code (precedent: PRs #4587, #4589, #4590, #4591).

Preserves every upstream-rsync cite (`// upstream: ...`) and every WHY
note (SSH child process management, socketpair stderr, watchdog/drain
thread invariants, `-oBatchMode=yes` injection rationale, IPv6 zone-id
handling, secluded-args quoting).

The crate already enforces `#![deny(missing_docs)]`, so all public
items carry rustdoc; the only rustdoc edit converts two `///` headers
on private test helpers (`create_test_handshake`, `create_test_parts`)
into `//` comments, since rustdoc on private items adds no value
without WHY content.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 20, 2026
@oferchen oferchen merged commit 6faa1b8 into master May 20, 2026
55 checks passed
@oferchen oferchen deleted the docs/comment-cleanup-rsync-io-v2 branch May 20, 2026 20:33
oferchen added a commit that referenced this pull request May 21, 2026
… items (#4648)

Follow-up to PR #4596 that scrubs three remaining restatement comments
the previous pass missed:

- `negotiation/buffer/storage.rs`: two test comments that simply repeated
  the assertion immediately below them (`// prefix_len should be clamped
  to buffer length (3)` directly above `assert_eq!(.., 3)`).
- `ssh/embedded/auth.rs::effective_username_none_no_env`: the leading
  comment claimed the test "temporarily clears the env var" but the body
  immediately explains that doing so is unsafe in a multi-threaded test
  and the env var is therefore left alone - drop the contradiction and
  tighten the surviving WHY comment.
- `ssh/embedded/auth.rs::auth_methods_ordering`: the lone comment
  restated the test name.

Preserves every upstream-rsync cite (`io.c read_int`/`write_int`,
`pipe.c:54-55`, `main.c:620-624`), the SEC-3 leading-dash rejection
rationale in `ssh/operand.rs`, the `SshChildHandle` drop/reap zombie
prevention notes, the socketpair vs anonymous-pipe fallback rationale,
and all watchdog / drain thread invariants.
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