diff --git a/src/iotro.rs b/src/iotro.rs index 683eb10..4f98798 100644 --- a/src/iotro.rs +++ b/src/iotro.rs @@ -94,6 +94,12 @@ pub const BRITISH: Language<'static> = Language { questions_feedback: "Questions, Suggestions and Feedback" }; +impl Default for Language<'static> { + fn default() -> Self { + GERMAN + } +} + impl FromStr for Language<'static> { type Err = anyhow::Error; diff --git a/src/main.rs b/src/main.rs index 1e46727..048fa36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -154,6 +154,7 @@ struct ProjectLecture { docent: String, #[serde_as(as = "DisplayFromStr")] date: Date, + #[serde(default = "Default::default")] #[serde_as(as = "DisplayFromStr")] lang: Language<'static> }