Skip to content

docs(transfer): drop restatement comments, tighten test annotations#4590

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

docs(transfer): drop restatement comments, tighten test annotations#4590
oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-transfer

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Sweep restatement, decorative, and outdated comments from the transfer crate's top-level sources.
  • Preserve every // upstream: citation, WHY note (state machine transitions, append-mode offset, fnamecmp inplace logic, etc.), and the existing rustdoc on public items.
  • Tighten a handful of test comments that were echoing the assert.

Scope

The transfer crate is large (~51K LoC across 170 files), so this PR caps coverage at the top-level files and submodule entry points. Per-submodule deep dives (generator, receiver, pipeline, disk_commit, setup, ack_batcher, map_file, delta_pipeline) can follow as separate PRs.

Files touched:

  • Top level: constants.rs, error.rs, flags.rs, role.rs, failed_directories.rs, temp_guard.rs, temp_cleanup.rs, compressed_writer.rs, parallel_io.rs
  • Submodule entry points: map_file/mod.rs, pipeline/mod.rs, transfer_ops/mod.rs

Net: 12 files, -114 lines (42 insertions, 156 deletions). No semantic changes. No new #[allow(...)].

Test plan

  • cargo fmt --all
  • cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings
  • CI: fmt+clippy, nextest (stable), Windows, macOS, Linux musl

Sweep the transfer crate to remove echo-the-code comments, decorative
section dividers, and a handful of redundant explanatory notes in tests,
while preserving every upstream-rsync citation, WHY note, and the
existing rustdoc on public items.

Scope: top-level transfer crate sources only. Per-crate cap:
  - top-level: lib.rs (no-op), constants.rs, error.rs, flags.rs,
    role.rs, failed_directories.rs, temp_guard.rs, temp_cleanup.rs,
    compressed_writer.rs, parallel_io.rs
  - submodule mods: map_file/mod.rs, pipeline/mod.rs,
    transfer_ops/mod.rs

Net: 12 files, -114 lines. No semantic changes. No new clippy allows.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 20, 2026
@oferchen oferchen merged commit d4ced19 into master May 20, 2026
55 checks passed
oferchen added a commit that referenced this pull request May 20, 2026
… items (#4596)

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.
@oferchen oferchen deleted the docs/comment-cleanup-transfer branch May 20, 2026 20:33
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