remove debug

This commit is contained in:
nyyu 2021-10-31 09:39:43 +01:00
parent 71512c08e6
commit 0982c30f7a
3 changed files with 23 additions and 23 deletions

View file

@ -9,18 +9,18 @@ use crate::data_source::{DataSource, Stat};
use crate::ChampInfo; use crate::ChampInfo;
use crate::Champion; use crate::Champion;
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct BuildResponse { struct BuildResponse {
lol: Lol, lol: Lol,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Lol { struct Lol {
#[serde(rename = "championsReport")] #[serde(rename = "championsReport")]
champions_report: Vec<ChampionReport>, champions_report: Vec<ChampionReport>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct ChampionReport { struct ChampionReport {
champion_id: u32, champion_id: u32,
role: String, role: String,
@ -28,7 +28,7 @@ struct ChampionReport {
stats: Stats, stats: Stats,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Stats { struct Stats {
starting_items: Build, starting_items: Build,
core_builds: Build, core_builds: Build,
@ -45,7 +45,7 @@ struct Stats {
assists: u32, assists: u32,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Build { struct Build {
build: Vec<u32>, build: Vec<u32>,
win_rate: f64, win_rate: f64,

View file

@ -12,31 +12,31 @@ pub struct KBDataSource {
token: Option<String>, token: Option<String>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct ChampionResponse { struct ChampionResponse {
patches: Vec<Patch>, //patches: Vec<Patch>,
champions: Vec<Champion>, champions: Vec<Champion>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Patch { struct Patch {
enabled: bool, //enabled: bool,
#[serde(rename = "patchVersion")] #[serde(rename = "patchVersion")]
patch_version: String, patch_version: String,
patchid: u32, //patchid: u32,
start: String, //start: String,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Champion { struct Champion {
id: u32, id: u32,
name: String, //name: String,
#[serde(rename = "className")] //#[serde(rename = "className")]
classname: String, //classname: String,
builds: Option<Position>, builds: Option<Position>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Position { struct Position {
bot: u16, bot: u16,
jungle: u16, jungle: u16,
@ -45,12 +45,12 @@ struct Position {
top: u16, top: u16,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct BuildResponse { struct BuildResponse {
builds2: Vec<KBBuild>, builds2: Vec<KBBuild>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct KBBuild { struct KBBuild {
position: String, position: String,
item0: KBItem, item0: KBItem,
@ -80,14 +80,14 @@ struct KBBuild {
patch: Patch, patch: Patch,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct KBItem { struct KBItem {
#[serde(rename = "itemId")] #[serde(rename = "itemId")]
item_id: u32, item_id: u32,
name: String, //name: String,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Summoner { struct Summoner {
name: String, name: String,
} }

View file

@ -8,12 +8,12 @@ use crate::Champion as ChampionLoL;
pub struct PBDataSource; pub struct PBDataSource;
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct ChampionResponse { struct ChampionResponse {
champions: Vec<Champion>, champions: Vec<Champion>,
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize)]
struct Champion { struct Champion {
key: Option<String>, key: Option<String>,
} }