refactor: fix lint checks by cargo clippy

This commit is contained in:
rzmk 2024-01-01 05:44:55 -05:00
parent 07e03335cc
commit f3e227ac2c
No known key found for this signature in database
2 changed files with 4 additions and 5 deletions

View file

@ -12,7 +12,7 @@ fn main() {
// If a message was provided, run the commands in succession // If a message was provided, run the commands in succession
if let Some(message) = &cli.message { if let Some(message) = &cli.message {
orchestrate_commit(&cli, &message); orchestrate_commit(&cli, message);
return; return;
} }
@ -71,7 +71,6 @@ fn main() {
} }
_ => { _ => {
println!("Exiting"); println!("Exiting");
return;
} }
} }
} }

View file

@ -5,15 +5,15 @@ use std::process::Command;
pub fn orchestrate_commit(cli: &Cli, message: &str) { pub fn orchestrate_commit(cli: &Cli, message: &str) {
if cli.add { if cli.add {
println!("Running git add -A"); println!("Running git add -A");
run(&cli, "git", &["add", "-A"]); run(cli, "git", &["add", "-A"]);
} }
println!("Running git commit -m \"{}\"", message); println!("Running git commit -m \"{}\"", message);
run(&cli, "git", &["commit", "-m", message]); run(cli, "git", &["commit", "-m", message]);
if cli.push { if cli.push {
println!("Running git push"); println!("Running git push");
run(&cli, "git", &["push"]); run(cli, "git", &["push"]);
} }
println!("Done 🎉"); println!("Done 🎉");