diff --git a/Cargo.toml b/Cargo.toml index acefeb5..9991b71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,13 @@ members = [ "xtask" ] +[workspace.lints.clippy] +use_self = "deny" +multiple_inherent_impl = "deny" + +[lints] +workspace = true + [profile.release] lto = true codegen-units = 1 diff --git a/src/main.rs b/src/main.rs index a7bb5e1..b045e0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -#![deny(clippy::use_self, clippy::multiple_inherent_impl)] - #[macro_use] extern crate cursive; #[macro_use] diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index de3fffe..6ad03cf 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -13,3 +13,6 @@ clap = "4.4.13" [dependencies.ncspot] default-features = false path = ".." + +[lints] +workspace = true diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 4a5f541..f7a8446 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -20,8 +20,8 @@ impl TryFrom<&ArgMatches> for XTaskSubcommand { fn try_from(value: &ArgMatches) -> Result { if let Some(subcommand) = value.subcommand() { match subcommand.0 { - "generate-manpage" => Ok(XTaskSubcommand::GenerateManpage), - "generate-shell-completion" => Ok(XTaskSubcommand::GenerateShellCompletion), + "generate-manpage" => Ok(Self::GenerateManpage), + "generate-shell-completion" => Ok(Self::GenerateShellCompletion), _ => Err(Error::new(clap::error::ErrorKind::InvalidSubcommand)), } } else {