From e8207080e70428a12404fda0d10018a61099fc5a Mon Sep 17 00:00:00 2001 From: nyyu Date: Sun, 1 Aug 2021 10:01:04 +0200 Subject: [PATCH] fix: clippy errors --- src/kb_data_source.rs | 2 +- src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kb_data_source.rs b/src/kb_data_source.rs index 5acc76d..c658366 100644 --- a/src/kb_data_source.rs +++ b/src/kb_data_source.rs @@ -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)); } } } diff --git a/src/main.rs b/src/main.rs index dae95f2..00d2fb8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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);