Skip to content

Commit

Permalink
fix: add more deny_unknown_fields to help user (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Oct 18, 2023
1 parent b2b26ed commit 2c1acdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/project/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use url::Url;
/// Describes the contents of a project manifest.
#[serde_as]
#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ProjectManifest {
/// Information about the project
pub project: ProjectMetadata,
Expand Down Expand Up @@ -177,6 +178,7 @@ impl<'de> Deserialize<'de> for TargetSelector {

#[serde_as]
#[derive(Debug, Clone, Default, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct TargetMetadata {
/// Target specific dependencies
#[serde(default)]
Expand Down
1 change: 1 addition & 0 deletions src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ impl Task {
/// A command script executes a single command from the environment
#[serde_as]
#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct Execute {
/// A list of arguments, the first argument denotes the command to run. When deserializing both
/// an array of strings and a single string are supported.
Expand Down

0 comments on commit 2c1acdb

Please sign in to comment.