Move global lints into Cargo.toml
This commit is contained in:
parent
6a2379ce78
commit
71baade6d4
3 changed files with 29 additions and 45 deletions
38
Cargo.toml
38
Cargo.toml
|
|
@ -113,18 +113,36 @@ assets = [
|
|||
["CHANGELOG.md", "usr/share/doc/oxipng/", "644"],
|
||||
]
|
||||
|
||||
[lints.rust]
|
||||
missing_copy_implementations = "deny"
|
||||
missing_debug_implementations = "deny"
|
||||
trivial_casts = "warn"
|
||||
trivial_numeric_casts = "warn"
|
||||
unused_import_braces = "warn"
|
||||
|
||||
[lints.clippy]
|
||||
unnecessary_semicolon = "warn"
|
||||
use_self = "warn"
|
||||
ignored_unit_patterns = "warn"
|
||||
unseparated_literal_suffix = "warn"
|
||||
missing_const_for_fn = "warn"
|
||||
redundant_closure_for_method_calls = "warn"
|
||||
option_if_let_else = "warn"
|
||||
redundant_clone = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
cloned_instead_of_copied = "warn"
|
||||
expl_impl_clone_on_copy = "warn"
|
||||
float_cmp_const = "warn"
|
||||
if_not_else = "warn"
|
||||
useless_let_if_seq = "warn"
|
||||
ignored_unit_patterns = "warn"
|
||||
linkedlist = "warn"
|
||||
manual_let_else = "warn"
|
||||
map_flatten = "warn"
|
||||
map_unwrap_or = "warn"
|
||||
match_same_arms = "warn"
|
||||
mem_forget = "warn"
|
||||
missing_const_for_fn = "warn"
|
||||
mut_mut = "warn"
|
||||
mutex_integer = "warn"
|
||||
needless_continue = "warn"
|
||||
option_if_let_else = "warn"
|
||||
path_buf_push_overwrite = "warn"
|
||||
range_plus_one = "warn"
|
||||
redundant_clone = "warn"
|
||||
redundant_closure_for_method_calls = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
unnecessary_semicolon = "warn"
|
||||
unseparated_literal_suffix = "warn"
|
||||
use_self = "warn"
|
||||
useless_let_if_seq = "warn"
|
||||
|
|
|
|||
21
src/lib.rs
21
src/lib.rs
|
|
@ -1,23 +1,4 @@
|
|||
#![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)]
|
||||
#![deny(missing_debug_implementations, missing_copy_implementations)]
|
||||
#![warn(clippy::expl_impl_clone_on_copy)]
|
||||
#![warn(clippy::float_cmp_const)]
|
||||
#![warn(clippy::linkedlist)]
|
||||
#![warn(clippy::map_flatten)]
|
||||
#![warn(clippy::match_same_arms)]
|
||||
#![warn(clippy::mem_forget)]
|
||||
#![warn(clippy::mut_mut)]
|
||||
#![warn(clippy::mutex_integer)]
|
||||
#![warn(clippy::needless_continue)]
|
||||
#![warn(clippy::path_buf_push_overwrite)]
|
||||
#![warn(clippy::range_plus_one)]
|
||||
#![allow(clippy::cognitive_complexity)]
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
#![cfg_attr(
|
||||
not(feature = "zopfli"),
|
||||
allow(irrefutable_let_patterns),
|
||||
allow(unreachable_patterns)
|
||||
)]
|
||||
#![cfg_attr(not(feature = "zopfli"), allow(unreachable_patterns))]
|
||||
|
||||
#[cfg(feature = "parallel")]
|
||||
extern crate rayon;
|
||||
|
|
|
|||
15
src/main.rs
15
src/main.rs
|
|
@ -1,18 +1,3 @@
|
|||
#![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)]
|
||||
#![deny(missing_debug_implementations, missing_copy_implementations)]
|
||||
#![warn(clippy::expl_impl_clone_on_copy)]
|
||||
#![warn(clippy::float_cmp_const)]
|
||||
#![warn(clippy::linkedlist)]
|
||||
#![warn(clippy::map_flatten)]
|
||||
#![warn(clippy::match_same_arms)]
|
||||
#![warn(clippy::mem_forget)]
|
||||
#![warn(clippy::mut_mut)]
|
||||
#![warn(clippy::mutex_integer)]
|
||||
#![warn(clippy::needless_continue)]
|
||||
#![warn(clippy::path_buf_push_overwrite)]
|
||||
#![warn(clippy::range_plus_one)]
|
||||
#![allow(clippy::cognitive_complexity)]
|
||||
|
||||
#[cfg(not(feature = "parallel"))]
|
||||
mod rayon;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue