fix: clippy — collapse nested if in cast photo store
Some checks failed
CI / Check / Test (push) Has been cancelled
Some checks failed
CI / Check / Test (push) Has been cancelled
This commit is contained in:
@@ -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}"),
|
||||||
|
|||||||
Reference in New Issue
Block a user