From a23a5aedfbb5efd7edc558000146bfae5f792fc5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 4 Feb 2024 12:38:29 +0000 Subject: [PATCH] clippy: Suppress a lot of lints --- src/main.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3ad7311..ed1bb14 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,22 @@ +// These allows should be in a [lints] in Cargo.toml, +// which was stabilised in Rust 1.74. So maybe not do that yet. + +// Non-minimal coding patterns we sometimes use for clarity +#![allow(clippy::collapsible_if)] +#![allow(clippy::single_match)] +#![allow(clippy::let_and_return)] +#![allow(clippy::redundant_closure_call)] +#![allow(clippy::needless_question_mark)] +#![allow(clippy::len_zero)] +#![allow(clippy::needless_borrows_for_generic_args)] +#![allow(clippy::wildcard_in_or_patterns)] +// Things we might do for uniformity/generality which the compiler will +// optimise, but which clippy wants to normalise into a less general case +#![allow(clippy::single_char_pattern)] +#![allow(clippy::useless_format)] +#![allow(clippy::needless_borrow)] +#![allow(clippy::redundant_closure)] + use clap::Parser; use std::process::ExitCode; -- 2.30.2