diff --git a/src/searchers/mtg.rs b/src/searchers/mtg.rs index d0ff148..56556fc 100644 --- a/src/searchers/mtg.rs +++ b/src/searchers/mtg.rs @@ -25,7 +25,7 @@ pub struct MtgCard { pub name: String, pub cost: Option, pub typeline: String, - pub rules: String, + pub rules: Option, pub flavor: Option, pub power: Option, pub toughness: Option, @@ -80,7 +80,7 @@ fn parse_entry (page: String) -> Result { name: card_name, cost: entry["manaCost"].as_str().map(String::from), typeline: entry["type"].as_str().map(String::from).expect("expected type in json data"), - rules: entry["text"].as_str().map(String::from).expect("expected text in json data"), + rules: entry["text"].as_str().map(String::from), flavor: entry["flavor"].as_str().map(String::from), power: entry["power"].as_str().map(String::from), toughness: entry["toughness"].as_str().map(String::from),