1
0
Fork 0
mirror of https://github.com/exverge-0/yuzu-games-parser.git synced 2024-12-22 12:42:01 +00:00

Rename title_id to titleId as requested

This commit is contained in:
Exverge 2024-04-04 18:21:18 -04:00
parent 991c8d737c
commit 25cc7facf1
No known key found for this signature in database
GPG key ID: 19AAFC0AC6A9B35A

View file

@ -1,10 +1,11 @@
use crate::{TestCase, OS};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::{OS, TestCase};
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Game { pub struct Game {
pub(crate) name: String, pub(crate) name: String,
pub(crate) description: String, pub(crate) description: String,
#[serde(rename = "titleId")]
pub(crate) title_id: String, pub(crate) title_id: String,
pub(crate) img: String, pub(crate) img: String,
pub(crate) tests: Vec<Test>, pub(crate) tests: Vec<Test>,
@ -33,7 +34,7 @@ pub fn testcase_to_test(case: &TestCase) -> Test {
3 => 3, 3 => 3,
4 => 2, 4 => 2,
5 => 1, 5 => 1,
_ => unreachable!() _ => unreachable!(),
}, },
details: None, details: None,
test_date: case.date.clone(), test_date: case.date.clone(),
@ -42,8 +43,9 @@ pub fn testcase_to_test(case: &TestCase) -> Test {
version: case.version.clone(), version: case.version.clone(),
os: match case.os { os: match case.os {
OS::Windows => "Windows", OS::Windows => "Windows",
OS::Linux => "Linux" OS::Linux => "Linux",
}.to_string(), }
.to_string(),
from_yuzu: true, from_yuzu: true,
} }
} }