chore(lint): pin Rust toolchain to 1.95 and adopt clippy 1.95 suggestions

- Add rust-toolchain.toml to align local and CI Rust versions, eliminating
  clippy roulette caused by `dtolnay/rust-toolchain@stable` drift.
- Fix 9 clippy 1.95 findings introduced by Hermes Phase 4-8 modules:
  * 4x unnecessary_sort_by  -> sort_by_key (with Reverse for desc)
  * 3x collapsible_match    -> match guards
  * 1x while_let_loop       -> while let
  * 1x useless_conversion   -> drop redundant .into_iter()
This commit is contained in:
Jason
2026-04-16 22:57:20 +08:00
parent 0ca36b9d51
commit d03e6f9951
2 changed files with 5 additions and 0 deletions

4
rust-toolchain.toml Normal file
View File

@@ -0,0 +1,4 @@
[toolchain]
channel = "1.95"
components = ["rustfmt", "clippy"]
profile = "minimal"

View File

@@ -203,6 +203,7 @@ pub(crate) fn map_responses_stop_reason(
{
"max_tokens"
}
"incomplete" => "end_turn",
_ => "end_turn",
})
}