summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-09-18 15:47:46 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2024-09-18 15:47:46 -0700
commit6f30be2aedd2b11e9c9ce3bce1759c2404fd9271 (patch)
treea306548aad6586f7c5c00e8cbf11de0246b9cbfa
parentdc8214d6ca134d6650c272174762a36035b56f02 (diff)
downloadpandascore-6f30be2aedd2b11e9c9ce3bce1759c2404fd9271.tar.gz
pandascore-6f30be2aedd2b11e9c9ce3bce1759c2404fd9271.tar.zst
pandascore-6f30be2aedd2b11e9c9ce3bce1759c2404fd9271.zip
fix: increase player age bitsize to `u32`
Sometimes the PandaScore API will return the player's birth year instead of their age. This prevents the client from erroring when that happens.
-rw-r--r--src/model/player.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/player.rs b/src/model/player.rs
index bd765a1..486a308 100644
--- a/src/model/player.rs
+++ b/src/model/player.rs
@@ -24,7 +24,7 @@ pub struct CompactPlayer {
pub active: bool,
/// Age of the player, null if unknown. When `birthday` is null, age is an approxiamation.
/// Note: this field is only present for users running the Historical plan or up.
- pub age: Option<u8>,
+ pub age: Option<u32>,
/// Birthday of the player.
/// Note: this field is only present for users running the Historical plan or up.
#[serde(with = "birthday_format", default)]