diff --git a/src/main.rs b/src/main.rs index 0a7783a..5bedbba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,9 +105,13 @@ fn main() { if !champion.data.contains_key(&champ_id) { champ_id = get_champ_from_key(&champion, &champ_id); } + if champion.data.contains_key(&champ_id) { let path = lol_champs_dir.join(&champ_id).join("Recommended"); fs::create_dir_all(&path).unwrap(); + if positions.is_empty() { + error!("{} missing positions", &champ_id); + } for pos in positions { data_source.write_item_set( &champion.data.get(&champ_id).unwrap(), @@ -119,7 +123,7 @@ fn main() { thread::sleep(Duration::from_millis(data_source.get_timeout())); } } else { - error!("{} not found in LoL champs", &id); + error!("{} not found in LoL champs", &champ_id); } } }