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:
argenis de la rosa 2026-02-14 15:36:19 -05:00
parent 4fce8a5004
commit 153d6ff149
12 changed files with 46 additions and 54 deletions

View file

@ -250,6 +250,7 @@ fn read_openclaw_markdown_entries(source_workspace: &Path) -> Result<Vec<SourceE
Ok(all)
}
#[allow(clippy::needless_pass_by_value)]
fn parse_markdown_file(
_path: &Path,
content: &str,
@ -306,10 +307,9 @@ fn parse_structured_memory_line(line: &str) -> Option<(&str, &str)> {
fn parse_category(raw: &str) -> MemoryCategory {
match raw.trim().to_ascii_lowercase().as_str() {
"core" => MemoryCategory::Core,
"core" | "" => MemoryCategory::Core,
"daily" => MemoryCategory::Daily,
"conversation" => MemoryCategory::Conversation,
"" => MemoryCategory::Core,
other => MemoryCategory::Custom(other.to_string()),
}
}
@ -350,7 +350,7 @@ fn pick_optional_column_expr(columns: &[String], candidates: &[&str]) -> Option<
candidates
.iter()
.find(|candidate| columns.iter().any(|c| c == *candidate))
.map(|s| s.to_string())
.map(std::string::ToString::to_string)
}
fn pick_column_expr(columns: &[String], candidates: &[&str], fallback: &str) -> String {