Skip to content

Commit

Permalink
Move lints to Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
lautat committed Feb 10, 2024
1 parent 68e92fb commit 99f912c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
19 changes: 0 additions & 19 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 99f912c

Please sign in to comment.