add default language
This commit is contained in:
parent
4612cbdfaa
commit
cae7b9b99b
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue