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:
@@ -36,9 +36,9 @@ impl Tool for Todofinish {
|
||||
}
|
||||
|
||||
let content = std::fs::read_to_string(&path)
|
||||
.map_err(|e| anyhow!("failed to read todo.md: {}", e))?;
|
||||
.map_err(|e| anyhow!("failed to read todo.md: {e}"))?;
|
||||
|
||||
let task_index = args.get("task_index").and_then(|v| v.as_i64());
|
||||
let task_index = args.get("task_index").and_then(serde_json::Value::as_i64);
|
||||
|
||||
let mut new_content = String::new();
|
||||
let mut task_count = 0;
|
||||
@@ -70,10 +70,10 @@ impl Tool for Todofinish {
|
||||
}
|
||||
|
||||
std::fs::write(&path, new_content)
|
||||
.map_err(|e| anyhow!("failed to write to todo.md: {}", e))?;
|
||||
.map_err(|e| anyhow!("failed to write to todo.md: {e}"))?;
|
||||
|
||||
if let Some(idx) = task_index {
|
||||
Ok(format!("Successfully marked task {} as finished.", idx))
|
||||
Ok(format!("Successfully marked task {idx} as finished."))
|
||||
} else {
|
||||
Ok("Successfully marked ALL tasks as finished.".to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user