summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/exercise.rs2
-rw-r--r--src/state_file.rs1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/exercise.rs b/src/exercise.rs
index 232d7f9..ca47009 100644
--- a/src/exercise.rs
+++ b/src/exercise.rs
@@ -46,6 +46,7 @@ pub enum Mode {
}
#[derive(Deserialize)]
+#[serde(deny_unknown_fields)]
pub struct InfoFile {
pub exercises: Vec<Exercise>,
}
@@ -65,6 +66,7 @@ impl InfoFile {
// Deserialized from the `info.toml` file.
#[derive(Deserialize)]
+#[serde(deny_unknown_fields)]
pub struct Exercise {
// Name of the exercise
pub name: String,
diff --git a/src/state_file.rs b/src/state_file.rs
index 583e043..6b80354 100644
--- a/src/state_file.rs
+++ b/src/state_file.rs
@@ -5,6 +5,7 @@ use std::fs;
use crate::exercise::Exercise;
#[derive(Serialize, Deserialize)]
+#[serde(deny_unknown_fields)]
pub struct StateFile {
next_exercise_ind: usize,
progress: Vec<bool>,