diff --git a/docs/src/checks/bans/cfg.md b/docs/src/checks/bans/cfg.md index fcdd2bd5..85c4938b 100644 --- a/docs/src/checks/bans/cfg.md +++ b/docs/src/checks/bans/cfg.md @@ -65,9 +65,9 @@ If true, path dependencies will be included in the duplication check, otherwise Determines what happens when a dependency in [`[workspace.dependencies]`](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table) is not used in the workspace. -* `deny` - Will emit an error for each dependency that is not actually used in the workspace. +* `deny` (default) - Will emit an error for each dependency that is not actually used in the workspace. * `warn` - Will emit a warning for each dependency that is not actually used in the workspace, but does not fail the check. -* `allow` - (default) Ignores checking for unused workspace dependencies. +* `allow` - Ignores checking for unused workspace dependencies. ### The `highlight` field (optional) diff --git a/src/bans/cfg.rs b/src/bans/cfg.rs index c475334c..7f3fac73 100644 --- a/src/bans/cfg.rs +++ b/src/bans/cfg.rs @@ -345,9 +345,8 @@ impl<'de> Deserialize<'de> for WorkspaceDepsConfig { let mut th = TableHelper::new(value)?; let duplicates = th.optional("duplicates").unwrap_or(LintLevel::Deny); - let include_path_dependencies = - th.optional("include-path-dependencies").unwrap_or_default(); - let unused = th.optional("unused").unwrap_or(LintLevel::Allow); + let include_path_dependencies = th.optional("include-path-dependencies").unwrap_or(true); + let unused = th.optional("unused").unwrap_or(LintLevel::Deny); th.finalize(None)?;