diff --git a/Cargo.toml b/Cargo.toml index f4627e3..9be8958 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,3 +41,24 @@ default-features = false features = ["alloc"] optional = true version = "1.0.85" + +[lints.clippy] +alloc-instead-of-core = "warn" +as-conversions = "warn" +assertions-on-result-states = "warn" +cargo = "warn" +dbg-macro = "warn" +decimal-literal-representation = "warn" +expect-used = "warn" +panic = "warn" +pedantic = "warn" +self-named-module-files = "warn" +std-instead-of-alloc = "warn" +std-instead-of-core = "warn" +todo = "warn" +unimplemented = "warn" +unwrap-used = "warn" +unreachable = "warn" + +[lints.rust] +rust-2018-idioms = "warn" diff --git a/src/lib.rs b/src/lib.rs index 6c5d980..2ebc739 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,25 +58,6 @@ Deserialization is implemented with [Serde][3], and requires `gateway` feature t [`gateway`]: crate::gateway */ -#![warn( - clippy::alloc_instead_of_core, - clippy::as_conversions, - clippy::assertions_on_result_states, - clippy::cargo, - clippy::dbg_macro, - clippy::decimal_literal_representation, - clippy::expect_used, - clippy::panic, - clippy::pedantic, - clippy::self_named_module_files, - clippy::std_instead_of_alloc, - clippy::std_instead_of_core, - clippy::todo, - clippy::unimplemented, - clippy::unwrap_used, - clippy::unreachable, - rust_2018_idioms -)] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "gateway")]