This commit is contained in:
parent
fdb6f6a121
commit
e8207080e7
2 changed files with 4 additions and 4 deletions
|
@ -353,7 +353,7 @@ impl DataSource for KBDataSource {
|
|||
}
|
||||
|
||||
if let Some(b) = build {
|
||||
champ_data.push(self.get_build(&b));
|
||||
champ_data.push(self.get_build(b));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ fn execute_data_source(
|
|||
champion: &Champion,
|
||||
lol_champs_dir: &Path,
|
||||
) {
|
||||
let champs = data_source.get_champs_with_positions(&client, &champion);
|
||||
let champs = data_source.get_champs_with_positions(client, champion);
|
||||
|
||||
info!(
|
||||
"{} numbers of champs: {}",
|
||||
|
@ -176,14 +176,14 @@ fn get_and_write_item_set(
|
|||
id: u32,
|
||||
positions: &[String],
|
||||
) {
|
||||
if let Some(champ_id) = get_champ_from_key(&champion, id) {
|
||||
if let Some(champ_id) = get_champ_from_key(champion, id) {
|
||||
if let Some(champ) = champion.data.get(&champ_id) {
|
||||
if positions.is_empty() {
|
||||
error!("{}: {} empty positions", data_source.get_alias(), &champ_id);
|
||||
} else {
|
||||
let path = lol_champs_dir.join(&champ_id).join("Recommended");
|
||||
fs::create_dir_all(&path).unwrap();
|
||||
data_source.write_item_set(&champ, &positions, &path, &client);
|
||||
data_source.write_item_set(champ, positions, &path, client);
|
||||
}
|
||||
} else {
|
||||
error!("{} not found in LoL champs", &champ_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue