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