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:
@@ -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