Commit f2d156f
fix(clippy): clear 86 errors under -D warnings across impl/rust-cli/ (#74)
* fix(clippy): clear 86 errors under -D warnings across impl/rust-cli/
Combined auto-fix (`cargo clippy --fix`) for 60 mechanical lints +
manual fixes for the remaining 26 across 34 files.
Manual categories handled:
- `&PathBuf` → `&Path` (process_sub.rs ×2)
- `assert!(true)`, `assert!(len() >= 0)` removed (parser.rs, confirmation.rs, e2e_script_execution.rs)
- `manual_strip` → `strip_prefix` (functions.rs, state.rs, parser.rs)
- `format!` collapsed into outer `print!`/`println!` (pager.rs, commands.rs)
- `impl Default for RedirectSetup`
- doc_lazy_continuation: orphan doc block removed; new doc with blank line before
- empty_line_after_doc_comments: stray doc-comment without item removed
- unused_unsafe block removed from libc::WIFSTOPPED call
- needless_range_loop on Token slice → iterator + take/skip
- unused_doc_comments on macro invocations (proptest!) → plain `//` comments
Allow-listed (lint suggestion would change semantics or require
unrelated refactor; documented at each site):
- needless_range_loop on 2-D matrix init (correction.rs ×2)
- if_same_then_else on shell-operator branches (highlighter.rs)
- private_interfaces + dead_code on `expand_quoted_word_with_state`
- unused_assignments inside push_word! macro (parser.rs)
- should_implement_trait on TrapSignal::from_str (custom Option return)
- join_absolute_paths in sandbox-escape test (intentional)
- dead_code on test fixture helpers (populated_sandbox, dir_path, any_name, word)
Verification: `cargo clippy --all-targets --all-features -- -D warnings`
exits clean; `cargo test --release` reports 757 passed / 0 failed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(fmt): apply cargo fmt to clear --check drift from PR #73
PR #73's fmt sweep agent ran an older rustfmt; CI's stable rustfmt
sees 8 files needing reformat (mostly merged-multiline-args + trailing-
whitespace + match-arm-wrap). Apply the corrections.
Verified: `cargo fmt --check` clean, `cargo clippy -D warnings` clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f6c6aa8 commit f2d156f
34 files changed
Lines changed: 198 additions & 232 deletions
File tree
- impl/rust-cli
- benches
- src
- commands
- tests
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1677 | 1677 | | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | | - | |
| 1680 | + | |
1681 | 1681 | | |
1682 | 1682 | | |
1683 | 1683 | | |
| |||
1797 | 1797 | | |
1798 | 1798 | | |
1799 | 1799 | | |
1800 | | - | |
| 1800 | + | |
1801 | 1801 | | |
1802 | 1802 | | |
1803 | 1803 | | |
| |||
2187 | 2187 | | |
2188 | 2188 | | |
2189 | 2189 | | |
2190 | | - | |
| 2190 | + | |
2191 | 2191 | | |
2192 | 2192 | | |
2193 | 2193 | | |
| |||
2222 | 2222 | | |
2223 | 2223 | | |
2224 | 2224 | | |
2225 | | - | |
| 2225 | + | |
| 2226 | + | |
2226 | 2227 | | |
2227 | 2228 | | |
2228 | 2229 | | |
| |||
2577 | 2578 | | |
2578 | 2579 | | |
2579 | 2580 | | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
2589 | 2587 | | |
2590 | 2588 | | |
2591 | 2589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
342 | 341 | | |
343 | 342 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
358 | | - | |
| 356 | + | |
359 | 357 | | |
360 | 358 | | |
361 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | | - | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
227 | | - | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
| 856 | + | |
857 | 857 | | |
858 | | - | |
859 | 858 | | |
860 | 859 | | |
861 | 860 | | |
| |||
1160 | 1159 | | |
1161 | 1160 | | |
1162 | 1161 | | |
1163 | | - | |
| 1162 | + | |
1164 | 1163 | | |
1165 | 1164 | | |
1166 | 1165 | | |
| |||
1599 | 1598 | | |
1600 | 1599 | | |
1601 | 1600 | | |
1602 | | - | |
1603 | | - | |
| 1601 | + | |
| 1602 | + | |
1604 | 1603 | | |
1605 | 1604 | | |
1606 | | - | |
1607 | | - | |
| 1605 | + | |
| 1606 | + | |
1608 | 1607 | | |
1609 | 1608 | | |
1610 | 1609 | | |
| |||
0 commit comments