aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 9e08418..4addd02 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -88,7 +88,7 @@ fn main() {
let mut batches: Vec<Batch> = fs::read("data/batches.json")
.map_err(anyhow::Error::from)
.and_then(|x| Ok(serde_json::from_slice(&x)?))
- .unwrap_or_default();
+ .expect("failed to decode batches.json");
for batch in batches.iter_mut() {
simplify_batch(batch);
}
@@ -104,7 +104,7 @@ fn main() {
let mut batches: Vec<Batch> = fs::read("data/batches.json")
.map_err(anyhow::Error::from)
.and_then(|x| Ok(serde_json::from_slice(&x)?))
- .unwrap_or_default();
+ .expect("failed to decode batches.json");
let kanji_levels = read_kanji_levels().expect("read_kanji_levels");
let kanji_levels = kanji_levels
.into_iter()
@@ -123,7 +123,7 @@ fn main() {
let mut batches: Vec<Batch> = fs::read("data/batches.json")
.map_err(anyhow::Error::from)
.and_then(|x| Ok(serde_json::from_slice(&x)?))
- .unwrap_or_default();
+ .expect("failed to decode batches.json");
let jlpt_vocab = load_jlpt_vocab().expect("load_jlpt_vocab");
add_vocab(&mut batches, &jlpt_vocab);
fs::write(
@@ -150,7 +150,7 @@ fn main() {
let mut batches: Vec<Batch> = fs::read("data/batches.json")
.map_err(anyhow::Error::from)
.and_then(|x| Ok(serde_json::from_slice(&x)?))
- .unwrap_or_default();
+ .expect("failed to decode batches.json");
add_examples(&mut batches, &ex);