fix: resolve all clippy warnings, formatting, and Mistral endpoint
- Fix Mistral provider base URL (missing /v1 prefix caused 404s) - Resolve 55 clippy warnings across 28 warning types - Apply cargo fmt to 44 formatting violations - Remove unused imports (process_message, MultiObserver, VerboseObserver, ChatResponse, ToolCall, Path, TempDir) - Replace format!+push_str with write! macro - Fix unchecked Duration subtraction, redundant closures, clamp patterns - Declare missing feature flags (sandbox-landlock, sandbox-bubblewrap, browser-native) in Cargo.toml - Derive Default where manual impls were redundant - Add separators to long numeric literals (115200 → 115_200) - Restructure unreachable code in arduino_flash platform branches All 1,500 tests pass. Zero clippy warnings. Clean formatting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a5405db212
commit
4fca1abee8
14 changed files with 41 additions and 33 deletions
|
|
@ -124,10 +124,11 @@ impl Tool for HardwareBoardInfoTool {
|
|||
});
|
||||
}
|
||||
Err(e) => {
|
||||
output.push_str(&format!(
|
||||
"probe-rs attach failed: {}. Using static info.\n\n",
|
||||
e
|
||||
));
|
||||
use std::fmt::Write;
|
||||
let _ = write!(
|
||||
output,
|
||||
"probe-rs attach failed: {e}. Using static info.\n\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -135,13 +136,15 @@ impl Tool for HardwareBoardInfoTool {
|
|||
if let Some(info) = self.static_info_for_board(board) {
|
||||
output.push_str(&info);
|
||||
if let Some(mem) = memory_map_static(board) {
|
||||
output.push_str(&format!("\n\n**Memory map:**\n{}", mem));
|
||||
use std::fmt::Write;
|
||||
let _ = write!(output, "\n\n**Memory map:**\n{mem}");
|
||||
}
|
||||
} else {
|
||||
output.push_str(&format!(
|
||||
"Board '{}' configured. No static info available.",
|
||||
board
|
||||
));
|
||||
use std::fmt::Write;
|
||||
let _ = write!(
|
||||
output,
|
||||
"Board '{board}' configured. No static info available."
|
||||
);
|
||||
}
|
||||
|
||||
Ok(ToolResult {
|
||||
|
|
|
|||
|
|
@ -122,14 +122,16 @@ impl Tool for HardwareMemoryMapTool {
|
|||
|
||||
if !probe_ok {
|
||||
if let Some(map) = self.static_map_for_board(board) {
|
||||
output.push_str(&format!("**{}** (from datasheet):\n{}", board, map));
|
||||
use std::fmt::Write;
|
||||
let _ = write!(output, "**{board}** (from datasheet):\n{map}");
|
||||
} else {
|
||||
use std::fmt::Write;
|
||||
let known: Vec<&str> = MEMORY_MAPS.iter().map(|(b, _)| *b).collect();
|
||||
output.push_str(&format!(
|
||||
"No memory map for board '{}'. Known boards: {}",
|
||||
board,
|
||||
let _ = write!(
|
||||
output,
|
||||
"No memory map for board '{board}'. Known boards: {}",
|
||||
known.join(", ")
|
||||
));
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue