Skip to content

Commit c300b99

Browse files
Frandoclaude
andcommitted
chore: fmt patchbay-runner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2770ff4 commit c300b99

4 files changed

Lines changed: 18 additions & 19 deletions

File tree

patchbay-runner/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ fn resolve_sim_args(sims: Vec<PathBuf>, project_root: &Path) -> Result<Vec<PathB
248248
if path.is_file() {
249249
let text = std::fs::read_to_string(path)
250250
.with_context(|| format!("read {}", path.display()))?;
251-
let cfg: PatchbayConfig = toml::from_str(&text)
252-
.with_context(|| format!("parse {}", path.display()))?;
251+
let cfg: PatchbayConfig =
252+
toml::from_str(&text).with_context(|| format!("parse {}", path.display()))?;
253253
let sims_dir = project_root.join(&cfg.simulations);
254254
if !sims_dir.exists() {
255255
bail!(
@@ -262,7 +262,10 @@ fn resolve_sim_args(sims: Vec<PathBuf>, project_root: &Path) -> Result<Vec<PathB
262262
return Ok(vec![sims_dir]);
263263
}
264264
}
265-
bail!("no sim files specified and no patchbay.toml found in {}", project_root.display())
265+
bail!(
266+
"no sim files specified and no patchbay.toml found in {}",
267+
project_root.display()
268+
)
266269
}
267270

268271
#[derive(Deserialize)]

patchbay-runner/src/sim/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,3 @@ pub struct CaptureSpec {
282282
fn pipe_default() -> String {
283283
"stdout".to_string()
284284
}
285-

patchbay-runner/src/sim/runner.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ fn expand_sim_inputs(inputs: &[PathBuf]) -> Result<Vec<PathBuf>> {
479479

480480
/// Recursively collect `*.toml` files from a directory.
481481
fn collect_toml_files(dir: &Path, out: &mut Vec<PathBuf>) -> Result<()> {
482-
for ent in
483-
std::fs::read_dir(dir).with_context(|| format!("read sim dir {}", dir.display()))?
484-
{
482+
for ent in std::fs::read_dir(dir).with_context(|| format!("read sim dir {}", dir.display()))? {
485483
let ent = ent?;
486484
let path = ent.path();
487485
if path.is_dir() {
@@ -713,6 +711,7 @@ fn create_unique_dir(parent: &Path, base: &str) -> Result<PathBuf> {
713711
}
714712
}
715713

714+
#[allow(clippy::too_many_arguments)]
716715
async fn execute_single_sim(
717716
sim_path: &Path,
718717
run_work_dir: &Path,
@@ -1979,7 +1978,7 @@ timeout = "3600s"
19791978
vec![],
19801979
false,
19811980
None,
1982-
true, // no_build
1981+
true, // no_build
19831982
Some(Duration::from_secs(3)), // 3s timeout
19841983
)
19851984
.await;

patchbay-runner/src/sim/steps.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,13 @@ pub(crate) async fn execute_step(state: &mut SimState, step: &Step) -> Result<()
9191
capture = %key,
9292
"sim: waiting for required capture"
9393
);
94-
state
95-
.captures
96-
.wait(key, capture_timeout)
97-
.with_context(|| {
98-
format!(
99-
"step '{}': requires '{}'",
100-
step_id(step).unwrap_or("?"),
101-
key
102-
)
103-
})?;
94+
state.captures.wait(key, capture_timeout).with_context(|| {
95+
format!(
96+
"step '{}': requires '{}'",
97+
step_id(step).unwrap_or("?"),
98+
key
99+
)
100+
})?;
104101
tracing::debug!(
105102
step_id = ?step_id(step),
106103
capture = %key,
@@ -120,7 +117,8 @@ pub(crate) async fn execute_step(state: &mut SimState, step: &Step) -> Result<()
120117
results,
121118
..
122119
} => {
123-
let cmd_parts = interpolate_with_captures(cmd, &state.env, &state.captures, state.deadline)?;
120+
let cmd_parts =
121+
interpolate_with_captures(cmd, &state.env, &state.captures, state.deadline)?;
124122
let sid = id.as_deref().unwrap_or(device);
125123
tracing::info!(
126124
target: "patchbay::_events::CommandStarted",

0 commit comments

Comments
 (0)