diff options
Diffstat (limited to 'src/datafiles.rs')
-rw-r--r-- | src/datafiles.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/datafiles.rs b/src/datafiles.rs index 629badf..0e526ef 100644 --- a/src/datafiles.rs +++ b/src/datafiles.rs @@ -12,6 +12,8 @@ pub struct Example { pub ja: String, pub en: String, pub expl: String, + #[serde(default)] + pub furigana: Option<String>, pub id: Option<String>, pub chars: Charset, } @@ -151,6 +153,7 @@ pub fn read_examples(all_kanji: &Charset) -> Result<Vec<Example>> { expl: b.to_string(), id: Some(id.to_string()), chars: Charset::new(ja).inter(all_kanji), + furigana: None, }); } else { ret.push(Example { @@ -159,6 +162,7 @@ pub fn read_examples(all_kanji: &Charset) -> Result<Vec<Example>> { expl: b.to_string(), id: None, chars: Charset::new(ja).inter(all_kanji), + furigana: None, }); } } |