Commit 6e0ce88
committed
fix(hpc): clear last 5 clippy errors in lib doctest scope
Follow-up to bench migration commit (cb5caad). Removes the 5 lib-level
clippy errors that surfaced under `cargo clippy --lib --tests`:
- src/hpc/quantized.rs:431 — test fixture array used 3.14 as an arbitrary
roundtrip value; clippy::approx_constant flagged it as approximate PI.
Changed to 2.5 (still arbitrary, no longer triggers the lint).
- src/hpc/blackboard.rs:484-485 — `bb.alloc_f32("x", 3.14)` + matching
get assertion. Same case: arbitrary slot value, not actually PI.
(The f64 sibling test correctly uses `std::f64::consts::PI` keyed
as "pi" — kept unchanged.) Changed both 3.14 occurrences to 2.5.
- src/hpc/jitson/parser.rs:487 — JSON parsing test with input
`{"flt": 3.14, ...}` and matching float assertion. Both the JSON
literal and the assertion changed to 2.5 in lockstep.
- src/hpc/renderer.rs:428 — `assert!(GLOBAL_RENDERER.tick_count() >= 0)`
was always true (u64 ≥ 0). The function-doc comment says
"First-touch: tick count is 0", so the intent was an equality
assertion. Changed to `assert_eq!(..., 0)`.
Verification: `cargo clippy --all-targets --features rayon --no-deps`
returns 0 errors across lib + tests + examples + benches + lib doctests.
Remaining: 253 lib warnings (mostly unused imports + manual_div_ceil /
manual_is_multiple_of mechanical lints; cargo clippy --fix can apply
107 of them automatically — separate cleanup commit if wanted).1 parent cb5caad commit 6e0ce88
4 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
| 484 | + | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
0 commit comments