Skip to content

docs(platform): drop restatement comments and fix broken rustdoc links#4583

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

docs(platform): drop restatement comments and fix broken rustdoc links#4583
oferchen merged 1 commit into
masterfrom
docs/comment-cleanup-platform

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

Per-crate comment cleanup pass on the platform crate. The crate was already in excellent shape (every public item documented, comprehensive SAFETY comments on every #[allow(unsafe_code)] block), so the cleanup is small.

  • Restatement comments deleted: 3. // Child: / // Parent: labels on the fork arms in the daemonize test (the pid == 0 arm and child_pid binding self-document the branch), plus // Null terminator entry. on a SERVICE_TABLE_ENTRYW whose fields are explicit null_mut() / None.
  • Broken intra-doc links fixed in windows_service. Module-doc [\run_service_dispatcher`], [`ServiceStatusHandle`], [`install_service`], [`uninstall_service`], and [`signal::SignalFlags`]resolved before the#[cfg(windows)]/#[cfg(not(windows))] pub usere-exports brought the names into scope, socargo doc -p platform --no-depsfailed under#![deny(rustdoc::broken_intra_doc_links)]. Switched the four local items to backtick-only references and the cross-module link to a fully qualified [`crate::signal::SignalFlags`]` path, matching the known pitfall guidance.

All SAFETY comments on unsafe blocks were preserved verbatim. No new #[allow(...)] waivers. No semantic changes.

Files touched: 2 (crates/platform/src/daemonize.rs, crates/platform/src/windows_service.rs). Net: +5 / -8.

Test plan

  • cargo fmt --all -- --check clean.
  • cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings clean.
  • cargo doc -p platform --no-deps now succeeds (previously failed with five broken intra-doc links).
  • Comment-only; no behavioural change. CI nextest covers the unchanged code paths.

Remove three restatement comments that echo the adjacent code (Child:/
Parent: labels in the fork-based daemonize test, and a "Null terminator
entry" label on a SERVICE_TABLE_ENTRYW with explicit null fields).

Fix broken intra-doc links in the windows_service module documentation.
The bracketed names resolved at module-doc time before the conditional
pub use re-exports brought them into scope, breaking cargo doc on every
target. Switch to backtick-only references for the local items and use
a fully qualified path for SignalFlags.

All SAFETY comments above unsafe blocks are preserved verbatim; this
crate carries targeted #[allow(unsafe_code)] for platform FFI (chroot,
daemonize, name resolution, privilege transitions).
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