fix: clippy — collapse nested ifs, use div_ceil
Some checks failed
CI / Check / Test (push) Failing after 41s

This commit is contained in:
2026-06-03 01:11:17 +02:00
parent 857896f057
commit bca07b7824
2 changed files with 49 additions and 95 deletions

View File

@@ -13,11 +13,11 @@ pub async fn execute(
start_date: chrono::NaiveDate,
end_date: chrono::NaiveDate,
) -> Result<(), DomainError> {
if let Ok(Some(rec)) = ctx.repos.wrapup_repo.get_by_id(&wrapup_id).await {
if rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating {
tracing::debug!("wrapup {} already {}, skipping", wrapup_id.value(), if rec.status == WrapUpStatus::Ready { "ready" } else { "generating" });
return Ok(());
}
if let Ok(Some(rec)) = ctx.repos.wrapup_repo.get_by_id(&wrapup_id).await
&& (rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating)
{
tracing::debug!("wrapup {} already {:?}, skipping", wrapup_id.value(), rec.status);
return Ok(());
}
ctx.repos
@@ -99,11 +99,7 @@ pub async fn execute(
}
}
async fn resolve_images(
ctx: &AppContext,
paths: &[String],
label: &str,
) -> Vec<(String, Vec<u8>)> {
async fn resolve_images(ctx: &AppContext, paths: &[String], label: &str) -> Vec<(String, Vec<u8>)> {
let mut images = Vec::new();
for path in paths.iter().take(20) {
match ctx.services.image_storage.get(path).await {