style: cargo fmt --all

This commit is contained in:
Dionisio
2026-02-26 01:02:25 +01:00
parent 5f37d6ea1e
commit 2421724b80
3 changed files with 76 additions and 60 deletions
+19 -20
View File
@@ -733,18 +733,16 @@ impl BatchOperationService {
}
// ── Finalize ─────────────────────────────────────────────────────
let mut compat_writer = zip.close().await.map_err(|e| {
BatchOperationError::Internal(format!("ZIP finalize error: {}", e))
})?;
compat_writer.close().await.map_err(|e| {
BatchOperationError::Internal(format!("ZIP flush error: {}", e))
})?;
let mut compat_writer = zip
.close()
.await
.map_err(|e| BatchOperationError::Internal(format!("ZIP finalize error: {}", e)))?;
compat_writer
.close()
.await
.map_err(|e| BatchOperationError::Internal(format!("ZIP flush error: {}", e)))?;
let file_size = temp
.as_file()
.metadata()
.map(|m| m.len())
.unwrap_or(0);
let file_size = temp.as_file().metadata().map(|m| m.len()).unwrap_or(0);
info!(
"Batch download ZIP created: {} bytes in {}ms",
@@ -776,17 +774,18 @@ impl BatchOperationService {
let mut stream = std::pin::Pin::from(stream);
while let Some(chunk) = stream.next().await {
let bytes = chunk.map_err(|e| {
BatchOperationError::Internal(format!("stream read: {}", e))
})?;
writer.write_all(&bytes).await.map_err(|e| {
BatchOperationError::Internal(format!("zip chunk write: {}", e))
})?;
let bytes =
chunk.map_err(|e| BatchOperationError::Internal(format!("stream read: {}", e)))?;
writer
.write_all(&bytes)
.await
.map_err(|e| BatchOperationError::Internal(format!("zip chunk write: {}", e)))?;
}
writer.close().await.map_err(|e| {
BatchOperationError::Internal(format!("zip entry close: {}", e))
})?;
writer
.close()
.await
.map_err(|e| BatchOperationError::Internal(format!("zip entry close: {}", e)))?;
Ok(())
}