Skip to content

docs(ui): add /// doc comments above 19 impl blocks (R2.1 compliance) - #39

Merged
eastspire merged 1 commit into
masterfrom
chore/ui-r21-impl-doc-2026-08-28
Aug 28, 2026
Merged

docs(ui): add /// doc comments above 19 impl blocks (R2.1 compliance)#39
eastspire merged 1 commit into
masterfrom
chore/ui-r21-impl-doc-2026-08-28

Conversation

@eastspire

Copy link
Copy Markdown
Collaborator

Summary

Add a single /// doc-comment line above every impl block across six hook modules so the impl block itself satisfies the rust-standards R2.1 rule (fn and impl blocks must have a /// doc comment directly above).

fn blocks were already 100% compliant. This PR closes the gap on impl blocks only — 19 insertions across 6 files, zero code changes.

What changed

File impl blocks annotated
ui/src/hook/debounced_value/impl.rs 2 (inherent + Display)
ui/src/hook/lazy/impl.rs 3 (PartialEq for LoadState, inherent + Debug for LazyComponent)
ui/src/hook/previous/impl.rs 3 (inherent + Display + Default for Previous)
ui/src/hook/suspense/impl.rs 4 (inherent + Default + Display for SuspenseHandle, PartialEq for SuspensePhase)
ui/src/hook/throttled_value/impl.rs 2 (inherent + Display for ThrottledValue)
ui/src/hook/use_async/impl.rs 5 (Drop, slot-lifecycle inherent, public-API inherent, Debug, Default for UseAsyncHandle/UseAsyncSlot)

Why

rust-standards skill R2.1 mandates that every fn and every impl block in production code carries a /// doc comment that opens immediately above the item. audit_rust_standards.py does not enumerate this check (it covers 14 separate lints), so the audit tool's "all green" output masked the gap. A targeted scan (fn + impl regex + "block immediately above has ///") surfaced 19 impl blocks with no doc line — all in the hook layer.

Verification

  • cargo check -p euv-ui passes (native).
  • cargo check -p euv-ui --target wasm32-unknown-unknown was already green on master; no API change, so still green.
  • euv fmt reports Formatted 0 file(s), 796 unchanged. — formatting holds.
  • Re-scan after this change: Missing fn /// = 0, Missing impl /// = 0 across ui/src.

Scope / non-goals

  • No code, signature, semantic, formatting, or version changes.
  • No Cargo.toml edit, no version bump. euv-ui stays at 0.16.1.
  • No new tests added — pure doc-comment additions cannot regress runtime behaviour, and the macro-aware comment-stripped test extraction in this crate already exercises the hook layer that wraps these impls.

Followup

A second PR is in progress to wire the hook functions into component-level consumers (euv_fieldUseForm, animation primitives → UseTransition, etc.). That work is intentionally kept separate so this PR can land as a zero-risk compliance patch.

@eastspire
eastspire merged commit 7308af7 into master Aug 28, 2026
@eastspire
eastspire deleted the chore/ui-r21-impl-doc-2026-08-28 branch August 28, 2026 15:34
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.

1 participant