70 lines
1.7 KiB
Markdown
70 lines
1.7 KiB
Markdown
# T1.2.1 — Add rustdoc on `MediaType` variants and methods
|
|
|
|
**Status:** Pending Review
|
|
**Agent:** Kimi Code CLI
|
|
**Started:** 2026-05-11T07:23Z
|
|
**Completed:** 2026-05-11T07:24Z
|
|
**Commit:** see git log
|
|
**PRD:** ../PRD-wire-format-v2.md
|
|
|
|
## What I changed
|
|
|
|
- `crates/wzp-proto/src/media_type.rs:7-10` — added `///` doc comments to all 4 variants (`Audio`, `Video`, `Data`, `Control`)
|
|
- `crates/wzp-proto/src/media_type.rs:14` — added `///` doc on `to_wire`
|
|
- `crates/wzp-proto/src/media_type.rs:18` — added `///` doc on `from_wire`
|
|
|
|
## Why these choices
|
|
|
|
Follow-up from T1.2 review: coding standard #9 requires `///` on all public items. Added concise one-line docs matching the examples from the task spec.
|
|
|
|
## Deviations from the task spec
|
|
|
|
None.
|
|
|
|
## Verification output
|
|
|
|
```bash
|
|
$ cargo doc -p wzp-proto --no-deps 2>&1 | grep -i "missing" || echo "no missing-doc warnings"
|
|
no missing-doc warnings
|
|
```
|
|
|
|
```bash
|
|
$ cargo clippy -p wzp-proto --all-targets -- -D warnings -W missing_docs 2>&1 | grep "media_type.rs:" | head -10
|
|
# (no output — no missing-docs in media_type.rs)
|
|
```
|
|
|
|
```bash
|
|
$ cargo build -p wzp-proto
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.49s
|
|
```
|
|
|
|
```bash
|
|
$ cargo test -p wzp-proto --no-fail-fast
|
|
running 112 tests
|
|
test result: ok. 112 passed; 0 failed; ...
|
|
```
|
|
|
|
```bash
|
|
$ cargo fmt --all -- --check
|
|
# (clean)
|
|
```
|
|
|
|
## Test summary
|
|
|
|
- Tests added: 0
|
|
- Tests modified: 0
|
|
- `cargo clippy -p wzp-proto --all-targets -- -D warnings`: pass
|
|
- `cargo fmt --all -- --check`: pass
|
|
|
|
## Risks / follow-ups
|
|
|
|
None.
|
|
|
|
## Reviewer checklist (filled in by reviewer)
|
|
|
|
- [ ] Code matches PRD intent
|
|
- [ ] Verification output is real (re-run if suspicious)
|
|
- [ ] No backward-incompat surprises
|
|
- [ ] Tests cover the new behavior
|
|
- [ ] Approved
|