mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 17:53:29 +02:00
Add deny_unknown_fields
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user