style(library): rustfmt the cover-fetch helpers

CI `cargo fmt --all --check` flagged fetch_image's base64/header chains (added in
ce060d5 — clippy was run, fmt --check was missed). Pure formatting, no logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 13:21:03 +02:00
parent ce060d5c49
commit 6570ae51f9
+7 -2
View File
@@ -1133,7 +1133,9 @@ fn fetch_image(url: &str) -> Option<(Vec<u8>, 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<u8>, 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)