From e1bc9fda22ab6d95873c3a0b24b232a5210d34d4 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 30 Jun 2026 13:21:03 +0200 Subject: [PATCH] style(library): rustfmt the cover-fetch helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI `cargo fmt --all --check` flagged fetch_image's base64/header chains (added in 12c7ec9 — clippy was run, fmt --check was missed). Pure formatting, no logic change. Co-Authored-By: Claude Opus 4.8 --- crates/punktfunk-host/src/library.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/punktfunk-host/src/library.rs b/crates/punktfunk-host/src/library.rs index 859f64d..5cc1305 100644 --- a/crates/punktfunk-host/src/library.rs +++ b/crates/punktfunk-host/src/library.rs @@ -1133,7 +1133,9 @@ fn fetch_image(url: &str) -> Option<(Vec, String)> { .unwrap_or("image/jpeg") .to_string(); let bytes = if meta.contains(";base64") { - base64::engine::general_purpose::STANDARD.decode(data).ok()? + base64::engine::general_purpose::STANDARD + .decode(data) + .ok()? } else { data.as_bytes().to_vec() }; @@ -1146,7 +1148,10 @@ fn fetch_image(url: &str) -> Option<(Vec, String)> { .timeout(std::time::Duration::from_secs(10)) .build(); let resp = agent.get(url).call().ok()?; - let ctype = resp.header("Content-Type").unwrap_or("image/jpeg").to_string(); + let ctype = resp + .header("Content-Type") + .unwrap_or("image/jpeg") + .to_string(); let mut bytes = Vec::new(); resp.into_reader() .take(8 * 1024 * 1024)