base red: panic ratchet, #29582's new index and string slice use checked forms

Merged
LA
5d ago
+4-3

Summary

Base red: the cmux-tui panic ratchet is red on the feat tip since 19532c2e7e7 (tip watcher job 47df5bd8d21736ec724e85b2):

  • cmux-tui: clippy::indexing_slicing 832 > baseline 831
  • cmux-tui: clippy::string_slice 83 > baseline 82

The only cmux-tui change in 3c2f4eca851..19532c2e7e7 is b06e339a1b0 (#29582, carry of #29046). It added one of each. This PR replaces both with checked forms. There is no behavior change.

  • link/mod.rs: start_chat_cli::run(&args[1..]) → args.get(1..).unwrap_or_default(). The branch runs only when args.first() is start-chat, so the slice is the same.
  • link/start_chat_cli.rs fresh_place: &id[..8] of a uuid's simple form → its first 8 chars. The simple form is 32 ASCII hex digits, so the 8 chars are the same 8 bytes.

Testing

runrefresult
panic ratchet (--arg panic)tip 19532c2e7e7RED: the two rows above, job 47df5bd8d21736ec724e85b2
panic ratchet (--arg panic)head 964c27eab6bfpass (exit 0, no RED row; indexing_slicing and string_slice back at baseline), job 259d106df5aff7e29e6781d3. The warn-tier rows (arithmetic, casts) are the same as on the tip.
start_chat testshead25 of 25 pass, job b130a3c83fc9a3e5e830aa61

Observed / Not run

Observed: the runs above, on fleet Linux.

Changelog

none

Proof

No capture: a lint-only change.