ci: add GitHub Actions workflows with semantic-release auto-versioning

chore: fix all 702 clippy warnings across codebase
- auto-fix 475 via cargo clippy --fix
- fix remaining 227 manually: uninlined_format_args, redundant_closure, match_same_arms,
  underscore_binding, format_push_string, items_after_statements, needless_pass_by_value,
  clone_on_copy, case_sensitive_extension, single_match/let-else, write_with_newline,
  and other clippy lints
This commit is contained in:
asepharyana
2026-07-13 08:12:12 +07:00
parent be921d6836
commit 29a9fae3f6
79 changed files with 826 additions and 904 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ impl Tool for GitOperator {
.and_then(|v| v.as_array())
.map(|arr| {
arr.iter()
.filter_map(|v| v.as_str().map(|s| s.to_string()))
.filter_map(|v| v.as_str().map(std::string::ToString::to_string))
.collect()
})
.ok_or_else(|| anyhow!("missing required argument: args"))?;
@@ -67,12 +67,12 @@ impl Tool for GitOperator {
// of which tool the model uses.
let cmd_for_filter = format!("git {} {}", operation, arg_list.join(" "));
crate::tool::shell_filter::git::check_git_destructive(&cmd_for_filter)
.map_err(|e| anyhow!("blocked: {}", e))?;
.map_err(|e| anyhow!("blocked: {e}"))?;
let output = Command::new("git")
.arg(&operation)
.args(&arg_list)
.output()
.map_err(|e| anyhow!("git {} failed: {}", operation, e))?;
.map_err(|e| anyhow!("git {operation} failed: {e}"))?;
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
let combined = if stderr.is_empty() { stdout.trim().to_string() } else { format!("{}\n{}", stdout.trim(), stderr.trim()) };