Commit b859663
fix(rlm): clear 3 clippy -D warnings errors in mcp_tools.rs
Resolves #3008: `cargo clippy --workspace -- -D warnings` exited 101 on
committed code (introduced by 4a8ce5c, the mcp_search_skills feature).
This blocked every PR touching terraphim_rlm and the CI clippy gate
proposed in #2930/#2934.
Three surgical fixes (1 file, +3/-6):
1. mcp_tools.rs:428-431 — clippy::doc_lazy_continuation (x2)
Root cause: line 429 began with `+ author`, where `+` + space is a
markdown list-item marker, making lines 430-431 unindented lazy
continuations. Repositioned the line break so `+` lands at end of
line 428. Wording preserved verbatim.
2. mcp_tools.rs:1021 — clippy::redundant_closure
`.map(|v| serde_json::from_value::<SkillEntry>(v))` ->
`.map(serde_json::from_value::<SkillEntry>)`.
Empirically verified the function-pointer form compiles cleanly
(exit 0), disproving the now-removed cautionary comment at L1015-1017
that cited "stable-Rust inference quirks". The comment was stale.
Verification (this session):
- RED baseline: 3 errors reproduce identically on pristine origin/main
- cargo clippy -p terraphim_rlm -- -D warnings -> exit 0
- cargo clippy --workspace -- -D warnings -> exit 0 (issue core gate)
- cargo test -p terraphim_rlm --lib -> 135 passed, 0 failed
(exact match to issue baseline; zero behavioural change)
- UBS on mcp_tools.rs: 2 critical, 73 warning BOTH before and after
my edit (stash-verified) -> my change adds zero new findings. The 2
pre-existing criticals are `panic!` in test match-arms at L1183,
unrelated to this lint fix.
Scope note on AC6 (`cargo fmt --all -- --check`):
The issue's fmt AC is over-scoped. 6 pre-existing fmt hunks live in
mcp_tools.rs at lines 29, 932, 996, 1164, 1200 — none touched by this
fix (proven: stash->fmt->pop yields identical 6 hunks on pristine HEAD).
Absorbing them would violate one-concern-per-PR and contaminate this
lint fix with unrelated drift. PR #3011 independently documents this
same pre-existing drift. This PR is scoped to the 3 clippy errors only.
Refs #3008
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 55e959a commit b859663
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
| 428 | + | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | 1015 | | |
1019 | 1016 | | |
1020 | 1017 | | |
1021 | | - | |
| 1018 | + | |
1022 | 1019 | | |
1023 | 1020 | | |
1024 | 1021 | | |
| |||
0 commit comments