Make mod category nullable

This commit is contained in:
Tyler Hallada
2021-08-08 19:09:34 -06:00
parent b2d17f6217
commit 6136ac18fa
3 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ pub struct ModListResponse {
pub struct ScrapedMod<'a> {
pub nexus_mod_id: i32,
pub name: &'a str,
pub category: &'a str,
pub category: Option<&'a str>,
pub author: &'a str,
pub desc: Option<&'a str>,
}
@@ -89,8 +89,7 @@ impl ModListResponse {
.expect("Missing category link for mod");
let category = category_elem
.text()
.next()
.expect("Missing category text for mod");
.next();
let author_elem = right
.select(&author_select)
.next()