Commit a9b23d8
fix: unbreak rust-ci Test job (clippy 1.95 + missing fields) (#38)
## Summary
`cargo clippy --all-targets --all-features -- -D warnings` and `cargo
test` were both red on `main` after the toolchain rolled to **Rust
1.95.0** and **two struct fields** (`CrashReport::schema_version`,
`ProgramStatistics::safe_unwrap_calls`) were added in v2.5.0 without
updating every test/bench literal.
This PR unblocks the `Test` job in `rust-ci` reusable.
### Lib clippy fixes (5 sites)
| File | Lint | Fix |
|------|------|-----|
| `src/assemblyline.rs:435` | `unnecessary_sort_by` | `sort_by_key(\|r\|
Reverse(...))` |
| `src/bridge/lockfile.rs:23` | `type_complexity` | `type LockfileParser
= fn(&Path) -> Result<...>` |
| `src/bridge/registry.rs:71` | `new_without_default` | `impl Default
for MitigationRegistry` forwarding to `new()` |
| `src/mass_panic/imaging.rs:201` | `unnecessary_sort_by` |
`sort_by_key(\|c\| Reverse(...))` |
| `src/storage/mod.rs:586` | `needless_range_loop` | `for (attempt,
delay) in delays.iter().enumerate()` |
Plus 9 lints already auto-fixed by `cargo clippy --fix`
(`unnecessary_map_or`, `manual_range_contains`, `format_in_format_args`,
`single_component_path_imports`) across `src/assail/analyzer.rs`,
`src/bridge/{lockfile,reachability}.rs`, `src/main.rs`,
`src/storage/mod.rs`, `tests/seam_contract_tests.rs`.
### Test/bench fixes (6 sites)
- `tests/panll_tests.rs:222` — add `CrashReport.schema_version` field
- `tests/report_tests.rs:62` — same
- `tests/panll_tests.rs:247` — `map_or(false, ..)` → `is_some_and(..)`
- `tests/aspect_tests.rs:230` — `|path| f(path)` → `f` (redundant
closure)
- `tests/property_tests.rs:137` — `if let Some(_) = ..` → `.is_some()`
- `tests/property_tests.rs:260` — `vec![..]` → `[..]` (useless_vec)
- `tests/property_tests.rs:325` — replaced tautological `!is_empty()` on
const with `chars().count() > 0` (still exercises unicode-iteration
smoke check)
- `benches/scan_bench.rs:8/221` — `criterion::black_box` →
`std::hint::black_box` (deprecated); add `safe_unwrap_calls: 0` to
`ProgramStatistics` literal
### Overlap with PR #36
The `tests/seam_contract_tests.rs:433/490` fmt collapses overlap with PR
#36 (identical fix). Whichever lands second will be a no-op merge.
## Test plan
- [x] `cargo clippy --all-targets --all-features -- -D warnings` clean
- [x] `cargo fmt --check` clean
- [x] `cargo test --all-features --no-fail-fast` — all suites green
(218+218+... pass)
- [x] Signed commit, MPL-2.0 headers untouched
- [x] No semantic changes, no new API surface, no feature changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4e129ac commit a9b23d8
14 files changed
Lines changed: 47 additions & 37 deletions
File tree
- benches
- src
- assail
- bridge
- mass_panic
- storage
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3966 | 3966 | | |
3967 | 3967 | | |
3968 | 3968 | | |
3969 | | - | |
| 3969 | + | |
3970 | 3970 | | |
3971 | 3971 | | |
3972 | 3972 | | |
| |||
5174 | 5174 | | |
5175 | 5175 | | |
5176 | 5176 | | |
5177 | | - | |
5178 | | - | |
5179 | | - | |
5180 | | - | |
5181 | | - | |
5182 | | - | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
5183 | 5182 | | |
5184 | 5183 | | |
5185 | 5184 | | |
| |||
6007 | 6006 | | |
6008 | 6007 | | |
6009 | 6008 | | |
6010 | | - | |
| 6009 | + | |
6011 | 6010 | | |
6012 | 6011 | | |
6013 | 6012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2250 | 2250 | | |
2251 | 2251 | | |
2252 | 2252 | | |
2253 | | - | |
2254 | | - | |
| 2253 | + | |
| 2254 | + | |
2255 | 2255 | | |
2256 | 2256 | | |
2257 | 2257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
| 635 | + | |
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
| 672 | + | |
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments