style(smoke): apply rustfmt to op-smoke main.rs

Codex stop-time review caught: op-smoke was not rustfmt-clean. Three
hunks — outer `let model = ...unwrap_or_else` had its match body
inlined; one `eprintln!` line exceeded 100 chars and needed
expansion; one other formatting nit.

The previous commit's `cargo fmt --all -- --check` invocation reported
FMT_OK because the output scrolled past the diff hunks before I saw
them — the exit code path Codex relies on (not the truncated grep
output I read) caught the residual diffs. Lesson for the runbook:
trust the exit code, not eyeballing tail output.

`cargo fmt --all -- --check` clean now; `cargo clippy --workspace
--all-targets -- -D warnings` clean.
This commit is contained in:
Fini 2026-05-24 19:03:10 +08:00
parent b1d585e7b3
commit 935d923927

View file

@ -217,9 +217,11 @@ async fn main() -> std::process::ExitCode {
let provider_kind =
std::env::var("OPENPENCIL_LLM_PROVIDER").unwrap_or_else(|_| "anthropic".into());
let model = std::env::var("OPENPENCIL_ORCHESTRATOR_MODEL").unwrap_or_else(|_| match provider_kind.as_str() {
"anthropic" => "claude-sonnet-4-6".into(),
_ => "gpt-4o-mini".into(),
let model = std::env::var("OPENPENCIL_ORCHESTRATOR_MODEL").unwrap_or_else(|_| {
match provider_kind.as_str() {
"anthropic" => "claude-sonnet-4-6".into(),
_ => "gpt-4o-mini".into(),
}
});
eprintln!("[SMOKE] provider={provider_kind} model={model}");
@ -251,7 +253,9 @@ async fn main() -> std::process::ExitCode {
.ok()
.filter(|u| !u.is_empty());
let Some(base_url) = base_url else {
eprintln!("error: OPENPENCIL_LLM_BASE_URL is not set (e.g. https://api.openai.com/v1)");
eprintln!(
"error: OPENPENCIL_LLM_BASE_URL is not set (e.g. https://api.openai.com/v1)"
);
return std::process::ExitCode::from(3);
};
eprintln!("[SMOKE] base_url={base_url}");
@ -260,7 +264,9 @@ async fn main() -> std::process::ExitCode {
)))
}
other => {
eprintln!("error: unknown OPENPENCIL_LLM_PROVIDER={other:?} (want anthropic|openai-compat)");
eprintln!(
"error: unknown OPENPENCIL_LLM_PROVIDER={other:?} (want anthropic|openai-compat)"
);
return std::process::ExitCode::from(3);
}
};