This commit is contained in:
parent
0d51ef9628
commit
da71f11855
5 changed files with 11 additions and 11 deletions
|
@ -146,7 +146,7 @@ impl DataSource for CGGDataSource {
|
|||
fn get_champ_data_with_win_pourcentage(
|
||||
&self,
|
||||
champ: &ChampInfo,
|
||||
positions: &Vec<String>,
|
||||
positions: &[String],
|
||||
_client: &ureq::Agent,
|
||||
) -> Vec<(String, Vec<Value>, Stat)> {
|
||||
let mut data = vec![];
|
||||
|
@ -155,7 +155,7 @@ impl DataSource for CGGDataSource {
|
|||
let reports = CHAMPIONS_REPORT.lock().unwrap();
|
||||
for champion in reports.iter() {
|
||||
if champion.champion_id.to_string() == champ.key
|
||||
&& champion.role == position.to_owned()
|
||||
&& champion.role == *position
|
||||
{
|
||||
some_champ = Some(champion);
|
||||
break;
|
||||
|
|
|
@ -50,14 +50,14 @@ pub trait DataSource {
|
|||
fn get_champ_data_with_win_pourcentage(
|
||||
&self,
|
||||
champ: &ChampInfo,
|
||||
positions: &Vec<String>,
|
||||
positions: &[String],
|
||||
client: &ureq::Agent,
|
||||
) -> Vec<(String, Vec<Value>, Stat)>;
|
||||
|
||||
fn write_item_set(
|
||||
&self,
|
||||
champ: &ChampInfo,
|
||||
positions: &Vec<String>,
|
||||
positions: &[String],
|
||||
ver: &str,
|
||||
path: &PathBuf,
|
||||
client: &ureq::Agent,
|
||||
|
@ -73,7 +73,7 @@ pub trait DataSource {
|
|||
for pos in positions {
|
||||
let mut ok = false;
|
||||
for build in &data {
|
||||
if build.0 == pos.to_owned() {
|
||||
if build.0 == *pos {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ impl DataSource for KBDataSource {
|
|||
fn get_champ_data_with_win_pourcentage(
|
||||
&self,
|
||||
champ: &ChampInfo,
|
||||
position: &Vec<String>,
|
||||
position: &[String],
|
||||
client: &ureq::Agent,
|
||||
) -> Vec<(String, Vec<Value>, Stat)> {
|
||||
let mut champ_data = vec![];
|
||||
|
@ -346,7 +346,7 @@ impl DataSource for KBDataSource {
|
|||
let mut build: Option<&KBBuild> = None;
|
||||
|
||||
for b in &data.builds2 {
|
||||
if b.position.to_uppercase() == pos.to_owned() {
|
||||
if b.position.to_uppercase() == *pos {
|
||||
build = Some(b);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -185,9 +185,9 @@ fn get_and_write_item_set(
|
|||
client: &ureq::Agent,
|
||||
champion: &Champion,
|
||||
lol_champs_dir: &PathBuf,
|
||||
patch: &String,
|
||||
id: &String,
|
||||
positions: &Vec<String>,
|
||||
patch: &str,
|
||||
id: &str,
|
||||
positions: &[String],
|
||||
) {
|
||||
let mut champ_id: String = id.to_owned();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ impl DataSource for PBDataSource {
|
|||
fn get_champ_data_with_win_pourcentage(
|
||||
&self,
|
||||
_champ: &ChampInfo,
|
||||
_positions: &Vec<String>,
|
||||
_positions: &[String],
|
||||
_client: &ureq::Agent,
|
||||
) -> Vec<(String, Vec<Value>, Stat)> {
|
||||
vec![]
|
||||
|
|
Loading…
Add table
Reference in a new issue