Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kykosic committed Mar 27, 2023
1 parent 22dd1d9 commit b863e3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ const NOT_FOUND: &str = "failed to run 'cargo'";

fn run_fmt(dir: PathBuf, config: &Option<String>) -> Result<()> {
let mut cmd = cargo();
cmd.args(&["fmt", "--"]);
cmd.args(["fmt", "--"]);

if let Some(config) = config {
cmd.args(&["--config", config]);
cmd.args(["--config", config]);
}

cmd.current_dir(dir);
Expand All @@ -94,7 +94,7 @@ fn run_check(dir: PathBuf, features: &Option<String>, all_features: bool) -> Res
if all_features {
cmd.arg("--all-features");
} else if let Some(features) = features {
cmd.args(&["--features", features]);
cmd.args(["--features", features]);
}

cmd.current_dir(dir);
Expand All @@ -107,7 +107,7 @@ fn run_check(dir: PathBuf, features: &Option<String>, all_features: bool) -> Res

fn run_clippy(dir: PathBuf) -> Result<()> {
let status = cargo()
.args(&["clippy", "--", "-D", "warnings"])
.args(["clippy", "--", "-D", "warnings"])
.current_dir(dir)
.status()
.context(NOT_FOUND)?;
Expand Down Expand Up @@ -160,7 +160,7 @@ fn is_rust_file<P: AsRef<Path>>(path: P) -> bool {
return true;
}
}
return false;
false
}

fn cargo() -> Command {
Expand Down

0 comments on commit b863e3d

Please sign in to comment.