docs(ui): add /// doc comments above 19 impl blocks (R2.1 compliance) - #39
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a single
///doc-comment line above everyimplblock across six hook modules so theimplblock itself satisfies the rust-standards R2.1 rule (fnandimplblocks must have a///doc comment directly above).fnblocks were already 100% compliant. This PR closes the gap onimplblocks only — 19 insertions across 6 files, zero code changes.What changed
ui/src/hook/debounced_value/impl.rsDisplay)ui/src/hook/lazy/impl.rsPartialEqforLoadState, inherent +DebugforLazyComponent)ui/src/hook/previous/impl.rsDisplay+DefaultforPrevious)ui/src/hook/suspense/impl.rsDefault+DisplayforSuspenseHandle,PartialEqforSuspensePhase)ui/src/hook/throttled_value/impl.rsDisplayforThrottledValue)ui/src/hook/use_async/impl.rsDrop, slot-lifecycle inherent, public-API inherent,Debug,DefaultforUseAsyncHandle/UseAsyncSlot)Why
rust-standardsskill R2.1 mandates that everyfnand everyimplblock in production code carries a///doc comment that opens immediately above the item.audit_rust_standards.pydoes 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-uipasses (native).cargo check -p euv-ui --target wasm32-unknown-unknownwas already green onmaster; no API change, so still green.euv fmtreportsFormatted 0 file(s), 796 unchanged.— formatting holds.Missing fn /// = 0,Missing impl /// = 0acrossui/src.Scope / non-goals
Followup
A second PR is in progress to wire the hook functions into component-level consumers (
euv_field→UseForm, animation primitives →UseTransition, etc.). That work is intentionally kept separate so this PR can land as a zero-risk compliance patch.