lint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nyyu 2021-03-14 11:12:42 +01:00
parent 66a9ded315
commit f6a593b6e5
2 changed files with 3 additions and 3 deletions

View File

@ -241,7 +241,7 @@ impl DataSource for KBDataSource {
};
let mut blocks = vec![];
let mut winrate = 0.0;
if data.builds2.len() > 0 {
if !data.builds2.is_empty() {
winrate = (data.builds2[0].wins / data.builds2[0].games) * 100.;
let mut starting_items: Vec<Item> = vec![];
if data.builds2[0].start_item0.item_id != 0 {

View File

@ -126,9 +126,9 @@ fn main() {
}
}
fn get_champ_from_key(champs: &Champion, key: &String) -> String {
fn get_champ_from_key(champs: &Champion, key: &str) -> String {
for champ in champs.data.values() {
if key == &champ.key {
if key == champ.key {
return champ.id.clone();
}
}