Skip to content

Commit

Permalink
chore(settings): deny unknown settings fields
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Nov 30, 2021
1 parent a693d6f commit 8cf426a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub enum HookType {
}

#[derive(Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct Settings {
pub changelog_path: Option<PathBuf>,
pub github: Option<String>,
Expand All @@ -38,6 +39,7 @@ pub struct Settings {
}

#[derive(Debug, Deserialize, Serialize, Clone, Eq, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct AuthorSetting {
pub signature: String,
pub username: String,
Expand All @@ -59,6 +61,7 @@ impl Default for Settings {
}

#[derive(Debug, Deserialize, Serialize, Default, Eq, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct BumpProfile {
#[serde(default)]
pub pre_bump_hooks: Vec<String>,
Expand Down

0 comments on commit 8cf426a

Please sign in to comment.