fix: resolve clippy warnings and formatting issues for CI
- Fix doc_markdown warnings in WhatsApp channel - Fix needless_pass_by_value in cron, health, migration, service modules - Fix match_same_arms in migration.rs - Fix too_many_lines in skills/mod.rs - Fix manual_let_else in tools/file_write.rs - Apply cargo fmt formatting fixes All 435 tests pass, clippy clean.
This commit is contained in:
parent
4fce8a5004
commit
153d6ff149
12 changed files with 46 additions and 54 deletions
|
|
@ -69,15 +69,12 @@ impl Tool for FileWriteTool {
|
|||
tokio::fs::create_dir_all(parent).await?;
|
||||
}
|
||||
|
||||
let parent = match full_path.parent() {
|
||||
Some(p) => p,
|
||||
None => {
|
||||
return Ok(ToolResult {
|
||||
success: false,
|
||||
output: String::new(),
|
||||
error: Some("Invalid path: missing parent directory".into()),
|
||||
});
|
||||
}
|
||||
let Some(parent) = full_path.parent() else {
|
||||
return Ok(ToolResult {
|
||||
success: false,
|
||||
output: String::new(),
|
||||
error: Some("Invalid path: missing parent directory".into()),
|
||||
});
|
||||
};
|
||||
|
||||
// Resolve parent before writing to block symlink escapes.
|
||||
|
|
@ -103,15 +100,12 @@ impl Tool for FileWriteTool {
|
|||
});
|
||||
}
|
||||
|
||||
let file_name = match full_path.file_name() {
|
||||
Some(name) => name,
|
||||
None => {
|
||||
return Ok(ToolResult {
|
||||
success: false,
|
||||
output: String::new(),
|
||||
error: Some("Invalid path: missing file name".into()),
|
||||
});
|
||||
}
|
||||
let Some(file_name) = full_path.file_name() else {
|
||||
return Ok(ToolResult {
|
||||
success: false,
|
||||
output: String::new(),
|
||||
error: Some("Invalid path: missing file name".into()),
|
||||
});
|
||||
};
|
||||
|
||||
let resolved_target = resolved_parent.join(file_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue