From 56f63b6466f3c2f42a8be842d115f16d87b60264 Mon Sep 17 00:00:00 2001 From: Harlley Date: Fri, 21 Jul 2023 10:14:37 -0300 Subject: [PATCH] fix: snake case --- src/main.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 50d8bc0..b258944 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,13 +3,20 @@ use serde_derive::Deserialize; #[derive(Deserialize, Debug)] struct Summoner { + #[serde(rename = "id")] id: String, - accountId: String, + #[serde(rename = "accountId")] + account_id: String, + #[serde(rename = "puuid")] puuid: String, + #[serde(rename = "name")] name: String, - profileIconId: i32, - revisionDate: i64, - summonerLevel: i32, + #[serde(rename = "profileIconId")] + profile_icon_id: i32, + #[serde(rename = "revisionDate")] + revision_date: i64, + #[serde(rename = "summonerLevel")] + summoner_level: i32, } #[tokio::main]