cmux-tui: two base clippy reds (acpmux steer_now_tests, worktree-care store)
Base clippy red, priority zero. cargo clippy on feat-cmux-next stops at cmux-tui/crates/acpmux/src/claude_stdio/steer_now_tests.rs:28, added by #22805:
error: this creates an owned instance just for comparison
--> crates/acpmux/src/claude_stdio/steer_now_tests.rs:28:49
error: could not compile `acpmux` (lib test) due to 1 previous error
Because of it, every cmux-tui focused run's lint (linux) job is red. One example is job 119026509104 of run 39540130783, on #22471's head, which doesn't touch the file. The fix compares the response id directly with the i64 it wants: rpc::Id is serde_json::Value, which implements PartialEq<i64>. The comparison means the same thing; only the temporary Value goes away.
Second base red (29eba96fe0)
Once the steer_now_tests fix and a base merge were in, clippy on feat-cmux-next (c171cd0f60a) stopped next at cmux-tui/crates/cmux-worktree-care/src/store.rs:97, clippy::unnecessary_sort_by, which came in with #22753. The fix is manifests.sort_by_key(|b| std::cmp::Reverse(b.created_ms)). The order is still newest first, and since both sorts are stable, ties keep their order too.
Observed / Not run
- Observed: the clippy error above, at base
da0403c73f4. - Not run locally: clippy and the test, per the no-local-builds rule. The focused cmux-tui run on this head is linked in a comment below.
Changelog
none
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes five base clippy lint errors that were turning every cmux-tui focused lint job red on feat-cmux-next.
- Compares response ids against the
i64directly insteer_now_tests.rs;rpc::Idis aserde_json::Value, which implementsPartialEq<i64>, so the comparison is unchanged. - Sorts worktree manifests newest-first with
sort_by_keyandReverseinstead ofsort_by; the order is the same. - Uses
next_backto take the last echo inprompt_images.rs, avoiding walking the whole iterator. - Moves the registry path in
care_lifecycle.rsinstead of cloning it; the test does not use the source after the move. - Calls
open_insideunqualified inprocs.rs; the test module already hasuse super::*.