From 762da2db095f1f71ca3c91c1553176c02230b1d9 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Mon, 27 Nov 2023 15:29:16 +0100 Subject: [PATCH] build(clippy): enable pedantic lints from code When this is forgotten locally only the CI will notice this. Now these lints are always performed with clippy. Also cleanup the list of allowed lints and add future ones from the nursery which could also already be implemented. --- src/lib.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5b799cd..97374dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,19 +1,18 @@ +#![forbid(unsafe_code)] +#![warn(clippy::pedantic)] // TODO: remove and fix (or allow explicitly on the specific problem) #![allow( - clippy::large_enum_variant, - clippy::missing_const_for_fn, clippy::missing_errors_doc, - clippy::module_name_repetitions, clippy::must_use_candidate, - clippy::needless_collect, - clippy::new_without_default, - clippy::non_ascii_literal, clippy::single_match_else, clippy::struct_excessive_bools, - clippy::too_many_arguments, clippy::unreadable_literal, - clippy::use_self, - clippy::wildcard_imports + + // from clippy::nursery + // clippy::derive_partial_eq_without_eq, + // clippy::option_if_let_else, + // clippy::significant_drop_tightening, + // clippy::use_self, )] #[cfg(any(feature = "http-client", feature = "async-http-client"))]