fix clippy errors
This commit is contained in:
parent
562bedbcbf
commit
57f80ebde2
1 changed files with 23 additions and 28 deletions
|
@ -86,7 +86,7 @@ impl CGGDataSource {
|
|||
.collect::<Vec<String>>()
|
||||
.join("");
|
||||
|
||||
self.make_item_set(build, [label, &key_order.as_str()].join(" ").as_str())
|
||||
self.make_item_set(build, [label, key_order.as_str()].join(" ").as_str())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,10 +113,10 @@ impl DataSource for CGGDataSource {
|
|||
let page = &req.into_string().unwrap();
|
||||
|
||||
let datas: BuildResponse =
|
||||
serde_json::from_str(&extract_json("window.__PRELOADED_STATE__ = ", &page)).unwrap();
|
||||
serde_json::from_str(&extract_json("window.__PRELOADED_STATE__ = ", page)).unwrap();
|
||||
|
||||
let champs_stats: HashMap<String, ChampStat> =
|
||||
serde_json::from_str(&extract_json("window.__FLASH_CMS_APOLLO_STATE__ = ", &page))
|
||||
serde_json::from_str(&extract_json("window.__FLASH_CMS_APOLLO_STATE__ = ", page))
|
||||
.unwrap();
|
||||
for entry in champs_stats.iter() {
|
||||
CHAMPIONS_STATS
|
||||
|
@ -161,33 +161,28 @@ impl DataSource for CGGDataSource {
|
|||
}
|
||||
}
|
||||
if let Some(champ) = some_champ {
|
||||
let mut blocks = vec![];
|
||||
|
||||
blocks.push(self.make_item_set_from_list(
|
||||
let blocks = vec![
|
||||
self.make_item_set_from_list(
|
||||
&champ.stats.starting_items,
|
||||
"Highest % Win Starting Items | Skills: ",
|
||||
&champ.stats.skills,
|
||||
));
|
||||
blocks.push(
|
||||
),
|
||||
self.make_item_set(&champ.stats.core_builds, "Highest % Win Core Build Path:"),
|
||||
);
|
||||
blocks.push(
|
||||
self.make_item_set(&champ.stats.big_item_builds, "Highest % Win Big Items:"),
|
||||
);
|
||||
|
||||
blocks.push(self.make_item_set_from_list(
|
||||
self.make_item_set_from_list(
|
||||
&champ.stats.most_common_starting_items,
|
||||
"Most Frequent Starting Items | Skills: ",
|
||||
&champ.stats.most_common_skills,
|
||||
));
|
||||
blocks.push(self.make_item_set(
|
||||
),
|
||||
self.make_item_set(
|
||||
&champ.stats.most_common_core_builds,
|
||||
"Most Frequent Build Path",
|
||||
));
|
||||
blocks.push(self.make_item_set(
|
||||
),
|
||||
self.make_item_set(
|
||||
&champ.stats.most_common_big_item_builds,
|
||||
"Most Frequent Big Items:",
|
||||
));
|
||||
),
|
||||
];
|
||||
|
||||
let mut key: String = String::new();
|
||||
let champs_stats = CHAMPIONS_STATS.lock().unwrap();
|
||||
|
|
Loading…
Add table
Reference in a new issue