diff --git a/src/nexus_api/game_mod.rs b/src/nexus_api/game_mod.rs index d1a8516..35d6348 100644 --- a/src/nexus_api/game_mod.rs +++ b/src/nexus_api/game_mod.rs @@ -82,11 +82,10 @@ impl ModResponse { .as_str() .expect("Failed to parse description in mod response") }); - let thumbnail_link = self.json.get("picture_url").map(|thumbnail_link| { - thumbnail_link - .as_str() - .expect("Failed to parse picture_url in mod response") - }); + let thumbnail_link = self + .json + .get("picture_url") + .and_then(|thumbnail_link| thumbnail_link.as_str()); let user = self.json.get("user").expect("Missing user in mod response"); let author_name = user .get("name")