diff --git a/Cargo.toml b/Cargo.toml index c1ee89e2..3aaf3abc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -183,3 +183,52 @@ codegen-units=1 debug = 0 opt-level = 3 codegen-units=1 + +[lints] +workspace = true + +[workspace.lints.rust] +# missing_abi = "warn" +# missing_docs = "warn" +# noop_method_call = "warn" +# pointer_structural_match = "warn" +# unreachable_pub = "warn" +# unused_extern_crates = "warn" +# unused_import_braces = "warn" +# unused_lifetimes = "warn" +unused_qualifications = "warn" +# unused_tuple_struct_fields = "warn" + +[workspace.lints.clippy] +suspicious = "deny" +perf = "deny" +# redundant_clone = "warn" +# cloned_instead_of_copied = "warn" +expl_impl_clone_on_copy = "warn" +# pedantic = "warn" +# as_conversions = "warn" +dbg_macro = "warn" +# empty_structs_with_brackets = "warn" +# get_unwrap = "warn" +# if_then_some_else_none = "warn" +# let_underscore_must_use = "warn" +# map_err_ignore = "warn" +# missing_docs_in_private_items = "warn" +# negative_feature_names = "warn" +# pub_without_shorthand = "warn" +rc_buffer = "warn" +rc_mutex = "warn" +# redundant_feature_names = "warn" +# redundant_type_annotations = "warn" +# ref_patterns = "warn" +# rest_pat_in_fully_bound_structs = "warn" +# str_to_string = "warn" +# string_add = "warn" +# string_slice = "warn" +# string_to_string = "warn" +tests_outside_test_module = "warn" +undocumented_unsafe_blocks = "warn" +# unneeded_field_pattern = "warn" +# unseparated_literal_suffix = "warn" +# unwrap_used = "warn" +# wildcard_dependencies = "warn" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 44a80be9..0f808fb7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,3 @@ -#![warn( - rust_2018_idioms, - unused_qualifications, - clippy::cloned_instead_of_copied, - clippy::str_to_string -)] -#![deny(clippy::dbg_macro)] - pub mod api; mod config; mod database; diff --git a/src/main.rs b/src/main.rs index a188e6fc..cce432fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,12 +1,3 @@ -#![warn( - rust_2018_idioms, - unused_qualifications, - clippy::cloned_instead_of_copied, - clippy::str_to_string, - clippy::future_not_send -)] -#![deny(clippy::dbg_macro)] - use std::{ fs::Permissions, future::Future, io, net::SocketAddr, os::unix::fs::PermissionsExt, sync::atomic, time::Duration,