fmt: apply rustfmt across the P2 arc
CI's rustfmt check flagged the multi-line sqlx::query() calls I introduced in P2 (loop_id_for_run, zeroclaw_gateway_url, etc.). No behavior change — pure formatting.
This commit is contained in:
@@ -49,14 +49,13 @@ async fn ensure_loop_container(pool: &PgPool, workspace_id: Uuid, loop_id: Uuid)
|
||||
}
|
||||
};
|
||||
let state_root = loop_state_root().join(loop_id.to_string()).join("state");
|
||||
let spawned =
|
||||
match crate::research_container::spawn_loop(&docker, loop_id, &state_root).await {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
eprintln!("loops::ensure_loop_container({loop_id}): spawn failed: {e}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
let spawned = match crate::research_container::spawn_loop(&docker, loop_id, &state_root).await {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
eprintln!("loops::ensure_loop_container({loop_id}): spawn failed: {e}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
if let Err(e) = cm_db::repo::loops::set_zeroclaw_container(
|
||||
pool,
|
||||
loop_id,
|
||||
|
||||
@@ -883,10 +883,7 @@ async fn decide_publish(
|
||||
if approval.status != "pending" {
|
||||
return Err(ApiError::Conflict);
|
||||
}
|
||||
let notes_ref = notes
|
||||
.as_deref()
|
||||
.map(str::trim)
|
||||
.filter(|s| !s.is_empty());
|
||||
let notes_ref = notes.as_deref().map(str::trim).filter(|s| !s.is_empty());
|
||||
let landed = cm_db::repo::research_publish_approvals::decide(
|
||||
&state.pool,
|
||||
id,
|
||||
@@ -992,12 +989,21 @@ pub async fn get_artifact(
|
||||
let safe_title: String = topic
|
||||
.title
|
||||
.chars()
|
||||
.map(|c| if c.is_ascii_alphanumeric() || c == '-' || c == '_' { c } else { '-' })
|
||||
.map(|c| {
|
||||
if c.is_ascii_alphanumeric() || c == '-' || c == '_' {
|
||||
c
|
||||
} else {
|
||||
'-'
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
let filename = format!("{}-v{}.md", safe_title.trim_matches('-'), outcome.version);
|
||||
Ok((
|
||||
[
|
||||
(header::CONTENT_TYPE, "text/markdown; charset=utf-8".to_string()),
|
||||
(
|
||||
header::CONTENT_TYPE,
|
||||
"text/markdown; charset=utf-8".to_string(),
|
||||
),
|
||||
(
|
||||
header::CONTENT_DISPOSITION,
|
||||
format!("attachment; filename=\"{filename}\""),
|
||||
|
||||
Reference in New Issue
Block a user