mirror of
https://github.com/rzmk/commit-helper.git
synced 2025-12-19 05:29:24 +00:00
refactor: fix lint checks by cargo clippy
This commit is contained in:
parent
07e03335cc
commit
f3e227ac2c
2 changed files with 4 additions and 5 deletions
|
|
@ -12,7 +12,7 @@ fn main() {
|
|||
|
||||
// If a message was provided, run the commands in succession
|
||||
if let Some(message) = &cli.message {
|
||||
orchestrate_commit(&cli, &message);
|
||||
orchestrate_commit(&cli, message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +71,6 @@ fn main() {
|
|||
}
|
||||
_ => {
|
||||
println!("Exiting");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ use std::process::Command;
|
|||
pub fn orchestrate_commit(cli: &Cli, message: &str) {
|
||||
if cli.add {
|
||||
println!("Running git add -A");
|
||||
run(&cli, "git", &["add", "-A"]);
|
||||
run(cli, "git", &["add", "-A"]);
|
||||
}
|
||||
|
||||
println!("Running git commit -m \"{}\"", message);
|
||||
run(&cli, "git", &["commit", "-m", message]);
|
||||
run(cli, "git", &["commit", "-m", message]);
|
||||
|
||||
if cli.push {
|
||||
println!("Running git push");
|
||||
run(&cli, "git", &["push"]);
|
||||
run(cli, "git", &["push"]);
|
||||
}
|
||||
|
||||
println!("Done 🎉");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue