Skip to content

Commit ca322b5

Browse files
authored
πŸ”€πŸš‘ Merge: pull request #11 from Rinrin0413/dev
# v0.5.1 (hotfix) ## Fixes - Decoding error when the property `ts` of the object "badges" was not present
2 parents cf953fe + 8ab6617 commit ca322b5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

β€ŽCHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.5.1 (hotfix) 2023-12-01
2+
3+
## Fixes
4+
5+
- Decoding error when the property `ts` of the object "badges" was not present
6+
17
# v0.5.0 2023-11-30
28

39
## Fixes

β€ŽCargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tetr_ch"
33
description = "A library for the TETRA CHANNEL API."
4-
version = "0.5.0"
4+
version = "0.5.1"
55
authors = ["Rinrin.rs <rinrin0413.valley@gmail.com>"]
66
license-file = "LICENSE"
77
repository = "https://github.com/Rinrin0413/tetr-ch-rs.git"

β€Žsrc/model/user.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,11 @@ pub struct Badge {
733733
///
734734
/// Why it uses `deserialize_with` attribute?
735735
/// See [this issue](https://github.com/Rinrin0413/tetr-ch-rs/issues/4).
736-
#[serde(rename = "ts", deserialize_with = "deserialize_from_non_str_to_none")]
736+
#[serde(
737+
rename = "ts",
738+
deserialize_with = "deserialize_from_non_str_to_none",
739+
default
740+
)]
737741
pub received_at: Option<String>,
738742
/// The badge's group, if specified.
739743
///

0 commit comments

Comments
Β (0)