Skip to content

Commit

Permalink
style: fix formatting and clippy lints in cli_test.rs
Browse files Browse the repository at this point in the history
- Update code formatting to match rustfmt standards

- Use inline format arguments in panic! messages
  • Loading branch information
jamesbrink committed Feb 13, 2025
1 parent 44cf85f commit 1cf0f70
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/cli_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ async fn run_strainer_command(
) -> Result<std::process::Output> {
let binary_path = env::var("CARGO_BIN_EXE_strainer").unwrap_or_else(|_| {
// Fallback for running tests directly without cargo
let generic_path = env::current_dir()
.unwrap()
.join("target/debug/strainer");
let generic_path = env::current_dir().unwrap().join("target/debug/strainer");
let platform_path = env::current_dir()
.unwrap()
.join("target/x86_64-unknown-linux-gnu/debug/strainer");

if platform_path.exists() {
platform_path.display().to_string()
} else if generic_path.exists() {
generic_path.display().to_string()
} else {
panic!("Could not find strainer binary in either {:?} or {:?}", generic_path, platform_path);
panic!(
"Could not find strainer binary in either {generic_path:?} or {platform_path:?}"
);
}
});

Expand All @@ -62,19 +62,19 @@ fn spawn_strainer_command(
) -> anyhow::Result<tokio::process::Child> {
let binary_path = env::var("CARGO_BIN_EXE_strainer").unwrap_or_else(|_| {
// Fallback for running tests directly without cargo
let generic_path = env::current_dir()
.unwrap()
.join("target/debug/strainer");
let generic_path = env::current_dir().unwrap().join("target/debug/strainer");
let platform_path = env::current_dir()
.unwrap()
.join("target/x86_64-unknown-linux-gnu/debug/strainer");

if platform_path.exists() {
platform_path.display().to_string()
} else if generic_path.exists() {
generic_path.display().to_string()
} else {
panic!("Could not find strainer binary in either {:?} or {:?}", generic_path, platform_path);
panic!(
"Could not find strainer binary in either {generic_path:?} or {platform_path:?}"
);
}
});

Expand Down

0 comments on commit 1cf0f70

Please sign in to comment.