From: Ian Jackson Date: Sun, 24 Apr 2022 20:02:23 +0000 (+0100) Subject: dice: Allow loading old savefiles with no desc field X-Git-Tag: otter-1.1.0~458 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e57106fd4dc84dc383156b61b964cf454886ee3c;p=otter.git dice: Allow loading old savefiles with no desc field Signed-off-by: Ian Jackson --- diff --git a/src/dice.rs b/src/dice.rs index 749c5331..687283e0 100644 --- a/src/dice.rs +++ b/src/dice.rs @@ -38,7 +38,7 @@ pub struct Spec { #[serde(default="default_cooldown")] #[serde(with="humantime_serde")] cooldown: Duration, itemname: Option, - desc: Option, + #[serde(default)] desc: Option, } #[derive(Debug,Default,Clone,Serialize,Deserialize)]