Placate clippy (#1423)
This commit is contained in:
parent
2b46af1cae
commit
e7b7897ae2
@ -3,7 +3,7 @@ use std::{process::Command, str};
|
||||
|
||||
fn stdout(reference: &str) -> String {
|
||||
let output = Command::new(executable_path("ref-type"))
|
||||
.args(&["--reference", reference])
|
||||
.args(["--reference", reference])
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
|
@ -6,7 +6,7 @@ use {
|
||||
fn author(pr: u64) -> String {
|
||||
eprintln!("#{}", pr);
|
||||
let output = Command::new("sh")
|
||||
.args(&[
|
||||
.args([
|
||||
"-c",
|
||||
&format!("gh pr view {} --json author | jq -r .author.login", pr),
|
||||
])
|
||||
|
@ -257,15 +257,7 @@ impl<'src> Justfile<'src> {
|
||||
|
||||
let mut ran = BTreeSet::new();
|
||||
for (recipe, arguments) in grouped {
|
||||
Self::run_recipe(
|
||||
&context,
|
||||
recipe,
|
||||
arguments,
|
||||
&dotenv,
|
||||
search,
|
||||
&self.settings,
|
||||
&mut ran,
|
||||
)?;
|
||||
Self::run_recipe(&context, recipe, arguments, &dotenv, search, &mut ran)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@ -289,7 +281,6 @@ impl<'src> Justfile<'src> {
|
||||
arguments: &[&str],
|
||||
dotenv: &BTreeMap<String, String>,
|
||||
search: &Search,
|
||||
settings: &Settings,
|
||||
ran: &mut BTreeSet<Vec<String>>,
|
||||
) -> RunResult<'src, ()> {
|
||||
let mut invocation = vec![recipe.name().to_owned()];
|
||||
@ -328,7 +319,6 @@ impl<'src> Justfile<'src> {
|
||||
&arguments.iter().map(String::as_ref).collect::<Vec<&str>>(),
|
||||
dotenv,
|
||||
search,
|
||||
settings,
|
||||
ran,
|
||||
)?;
|
||||
}
|
||||
@ -351,7 +341,6 @@ impl<'src> Justfile<'src> {
|
||||
&evaluated.iter().map(String::as_ref).collect::<Vec<&str>>(),
|
||||
dotenv,
|
||||
search,
|
||||
settings,
|
||||
&mut ran,
|
||||
)?;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ fn working_directory_is_correct() {
|
||||
fs::create_dir(tmp.path().join("foo")).unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
.args(&["--command", "cat", "bar"])
|
||||
.args(["--command", "cat", "bar"])
|
||||
.current_dir(tmp.path().join("foo"))
|
||||
.output()
|
||||
.unwrap();
|
||||
@ -125,7 +125,7 @@ fn command_not_found() {
|
||||
fs::write(tmp.path().join("justfile"), "").unwrap();
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
.args(&["--command", "asdfasdfasdfasdfadfsadsfadsf", "bar"])
|
||||
.args(["--command", "asdfasdfasdfasdfadfsadsfadsf", "bar"])
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
|
@ -50,7 +50,7 @@ fn test_invocation_directory() {
|
||||
|
||||
let output = Command::new(&executable_path("just"))
|
||||
.current_dir(&subdir)
|
||||
.args(&["--shell", "sh"])
|
||||
.args(["--shell", "sh"])
|
||||
.output()
|
||||
.expect("just invocation failed");
|
||||
|
||||
|
@ -74,12 +74,12 @@ fn test_downwards_path_argument() {
|
||||
|
||||
let path = tmp.path();
|
||||
|
||||
search_test(&path, &["a/"]);
|
||||
search_test(&path, &["a/default"]);
|
||||
search_test(&path, &["./a/"]);
|
||||
search_test(&path, &["./a/default"]);
|
||||
search_test(&path, &["./a/"]);
|
||||
search_test(&path, &["./a/default"]);
|
||||
search_test(path, &["a/"]);
|
||||
search_test(path, &["a/default"]);
|
||||
search_test(path, &["./a/"]);
|
||||
search_test(path, &["./a/default"]);
|
||||
search_test(path, &["./a/"]);
|
||||
search_test(path, &["./a/default"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -111,12 +111,12 @@ fn test_downwards_multiple_path_argument() {
|
||||
|
||||
let path = tmp.path();
|
||||
|
||||
search_test(&path, &["a/b/"]);
|
||||
search_test(&path, &["a/b/default"]);
|
||||
search_test(&path, &["./a/b/"]);
|
||||
search_test(&path, &["./a/b/default"]);
|
||||
search_test(&path, &["./a/b/"]);
|
||||
search_test(&path, &["./a/b/default"]);
|
||||
search_test(path, &["a/b/"]);
|
||||
search_test(path, &["a/b/default"]);
|
||||
search_test(path, &["./a/b/"]);
|
||||
search_test(path, &["./a/b/default"]);
|
||||
search_test(path, &["./a/b/"]);
|
||||
search_test(path, &["./a/b/default"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -128,7 +128,7 @@ fn single_downards() {
|
||||
|
||||
let path = tmp.path();
|
||||
|
||||
search_test(&path, &["child/"]);
|
||||
search_test(path, &["child/"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -179,7 +179,7 @@ impl Test {
|
||||
let mut command = Command::new(&executable_path("just"));
|
||||
|
||||
if self.shell {
|
||||
command.args(&["--shell", "bash"]);
|
||||
command.args(["--shell", "bash"]);
|
||||
}
|
||||
|
||||
let mut child = command
|
||||
|
@ -53,7 +53,7 @@ fn justfile_without_working_directory_relative() -> Result<(), Box<dyn Error>> {
|
||||
};
|
||||
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(&tmp.path())
|
||||
.current_dir(tmp.path())
|
||||
.arg("--justfile")
|
||||
.arg("justfile")
|
||||
.output()?;
|
||||
@ -138,7 +138,7 @@ fn search_dir_child() -> Result<(), Box<dyn Error>> {
|
||||
};
|
||||
|
||||
let output = Command::new(executable_path("just"))
|
||||
.current_dir(&tmp.path())
|
||||
.current_dir(tmp.path())
|
||||
.arg("child/")
|
||||
.output()?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user