cmux-tui: two base clippy reds (acpmux steer_now_tests, worktree-care store)

Closed
TE
16d ago
+5-5

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


View with [code]smith Autofix with [code]smith
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 i64 directly in steer_now_tests.rs; rpc::Id is a serde_json::Value, which implements PartialEq<i64>, so the comparison is unchanged.
  • Sorts worktree manifests newest-first with sort_by_key and Reverse instead of sort_by; the order is the same.
  • Uses next_back to take the last echo in prompt_images.rs, avoiding walking the whole iterator.
  • Moves the registry path in care_lifecycle.rs instead of cloning it; the test does not use the source after the move.
  • Calls open_inside unqualified in procs.rs; the test module already has use super::*.