fix: clippy — collapse nested if in cast photo store
Some checks failed
CI / Check / Test (push) Has been cancelled

This commit is contained in:
2026-06-03 01:12:07 +02:00
parent bca07b7824
commit e378191045

View File

@@ -8,8 +8,8 @@ use domain::{
events::DomainEvent, events::DomainEvent,
models::{CastMember, CrewMember, Genre, Keyword, MovieProfile}, models::{CastMember, CrewMember, Genre, Keyword, MovieProfile},
ports::{ ports::{
EventHandler, ImageStorage, MovieEnrichmentClient, MovieProfileRepository, EventHandler, ImageStorage, MovieEnrichmentClient, MovieProfileRepository, MovieRepository,
MovieRepository, PersonCommand, SearchCommand, PersonCommand, SearchCommand,
}, },
value_objects::MovieId, value_objects::MovieId,
}; };
@@ -265,10 +265,10 @@ impl EnrichmentHandler {
let url = format!("https://image.tmdb.org/t/p/w185{path}"); let url = format!("https://image.tmdb.org/t/p/w185{path}");
match self.http.get(&url).send().await { match self.http.get(&url).send().await {
Ok(resp) if resp.status().is_success() => { Ok(resp) if resp.status().is_success() => {
if let Ok(bytes) = resp.bytes().await { if let Ok(bytes) = resp.bytes().await
if let Err(e) = self.image_storage.store(&key, &bytes).await { && let Err(e) = self.image_storage.store(&key, &bytes).await
tracing::debug!("cast photo store failed for {path}: {e}"); {
} tracing::debug!("cast photo store failed for {path}: {e}");
} }
} }
_ => tracing::debug!("cast photo download failed for {path}"), _ => tracing::debug!("cast photo download failed for {path}"),